Here's how GITHUB.COM makes money* and how much!

*Please read our disclaimer before using our estimates.
Loading...

GITHUB . COM {}

Detected CMS Systems:

  1. Analyzed Page
  2. Matching Content Categories
  3. CMS
  4. Monthly Traffic Estimate
  5. How Does Github.com Make Money
  6. How Much Does Github.com Make
  7. Wordpress Themes And Plugins
  8. Keywords
  9. Topics
  10. Payment Methods
  11. Questions
  12. Schema
  13. External Links
  14. Analytics And Tracking
  15. Libraries
  16. Hosting Providers

We are analyzing https://github.com/google/flax/issues/524.

Title:
Improve Error Message: Assigning a list of Modules to `self` incorrectly Β· Issue #524 Β· google/flax
Description:
In setup(), submodules are expected to "know their name" when they are assigned to self, which is implemented by overriding __setattr__. This can cause problems when appending modules to a list. Consider the following code. class Test(nn...
Website Age:
17 years and 9 months (reg. 2007-10-09).

Matching Content Categories {πŸ“š}

  • Technology & Computing
  • Telecommunications
  • Mobile Technology & AI

Content Management System {πŸ“}

What CMS is github.com built with?


Github.com is powered by WORDPRESS.

Traffic Estimate {πŸ“ˆ}

What is the average monthly size of github.com audience?

πŸš€πŸŒ  Tremendous Traffic: 10M - 20M visitors per month


Based on our best estimate, this website will receive around 10,666,346 visitors per month in the current month.

check SE Ranking
check Ahrefs
check Similarweb
check Ubersuggest
check Semrush

How Does Github.com Make Money? {πŸ’Έ}


Subscription Packages {πŸ’³}

We've located a dedicated page on github.com that might include details about subscription plans or recurring payments. We identified it based on the word pricing in one of its internal links. Below, you'll find additional estimates for its monthly recurring revenues.

How Much Does Github.com Make? {πŸ’°}


Subscription Packages {πŸ’³}

Prices on github.com are in US Dollars ($). They range from $4.00/month to $21.00/month.
We estimate that the site has approximately 5,347,483 paying customers.
The estimated monthly recurring revenue (MRR) is $22,459,429.
The estimated annual recurring revenues (ARR) are $269,513,148.

Wordpress Themes and Plugins {🎨}

What WordPress theme does this site use?

It is strange but we were not able to detect any theme on the page.

What WordPress plugins does this website use?

It is strange but we were not able to detect any plugins on the page.

Keywords {πŸ”}

error, list, modules, levskaya, setup, def, modulelist, sequential, code, commented, message, setattr, selflayers, flax, improve, marcvanzee, class, pytorch, make, module, approach, immutable, lists, users, avital, collaborator, structures, inside, issue, setupself, option, work, things, rwightman, names, container, dont, linen, open, sign, assigning, assigned, callself, call, return, assign, user, understand, abstraction, doesnt,

Topics {βœ’οΈ}

great long-term solution jax import random flax import linen error message triggers high-level view improve errors messages default sequentially iterates flax linen compact models running validation projects milestone code sketches showing tracks mutation properly supporting mutable modulelists flax linen setup assign mixed functions/modules setattr issue mentioned compact decorator approach invariant functional behavior avital added stage/block repeats contained modules saving =f'layers_{idx}' pytorch-image-models pytorch origin weights flax-registered container durable python state type projects mutable modulelist container final list immutable issues andsteing mentioned module list logic sequential approach mentioned error message personally feel option safely inside setup flax/linen exploring jax long-term methods force setattr works inside modules status docs milestone relationships class example1 error messages mental model fall back class example2 confusing error

Payment Methods {πŸ“Š}

  • Braintree

Questions {❓}

  • @marcvanzee - curious though, what is the utility of an immutable ModuleList?
  • Already have an account?
  • Can we generally "forbid" this?
  • Could/should we raise an error if you assign a "vanilla" list of Modules?
  • Do we ignore them and hope the user just doesn't use local variables to modify structures in self, or do you think there's a way to catch them?
  • When you mean "these structures", do you mean lists containing Modules?
  • Why can't we introduce a ModuleList abstraction that is immutable?

Schema {πŸ—ΊοΈ}

DiscussionForumPosting:
      context:https://schema.org
      headline:Improve Error Message: Assigning a list of Modules to `self` incorrectly
      articleBody:In `setup()`, submodules are expected to "know their name" when they are assigned to `self`, which is implemented by overriding `__setattr__`. This can cause problems when appending modules to a list. Consider the following code. ``` class Test(nn.Module): def setup(self): self.layers = [] for i in range(3): self.layers.append(nn.Dense(5)) def __call__(self, x): for layer in self.layers: x = layer(x) # <--- ValueError: Can't call methods on orphaned modules return x ``` The code is failing because `self.layers.append()` does not assign anything to `self`, so the overwritten `__setattr__` isn't triggered. As a result, the `Dense` modules are not properly initialized and they are recognized as "orphaned" (no parent scope). The canonical way to fix this code is: ``` def setup(self): self.layers = [nn.Dense(5) for _ in range(3)] ``` Requiring the user to understand this distinction causes mental overload, especially since the error message is cryptic. Some suggestions for improvements: 1. Improve the error message by explaining how modules should be assigned to `self` in `setup`. 2. Create a new abstraction `ModuleList`, and only allow lists of Modules here (similar to PyTorch). 3. Convert the list to a some data structure that tracks mutation properly. Option (1) is a quick fix, but doesn't seem like a great long-term solution, since this error can appear in other cases as well, so we want to make sure the error message also covers the other cases. Option (2) doesn't require much mental overload, but the user should remember that this abstraction exists. Option (3) would also work, but I fear that this magic may lead to new special cases in the future that we should address. I personally feel option (2) is most consistent and robust in the long-term. Since it doesn't have to be used in a particular way, it seems also easiest to understand for users.
      author:
         url:https://github.com/marcvanzee
         type:Person
         name:marcvanzee
      datePublished:2020-10-09T12:43:50.000Z
      interactionStatistic:
         type:InteractionCounter
         interactionType:https://schema.org/CommentAction
         userInteractionCount:15
      url:https://github.com/524/flax/issues/524
      context:https://schema.org
      headline:Improve Error Message: Assigning a list of Modules to `self` incorrectly
      articleBody:In `setup()`, submodules are expected to "know their name" when they are assigned to `self`, which is implemented by overriding `__setattr__`. This can cause problems when appending modules to a list. Consider the following code. ``` class Test(nn.Module): def setup(self): self.layers = [] for i in range(3): self.layers.append(nn.Dense(5)) def __call__(self, x): for layer in self.layers: x = layer(x) # <--- ValueError: Can't call methods on orphaned modules return x ``` The code is failing because `self.layers.append()` does not assign anything to `self`, so the overwritten `__setattr__` isn't triggered. As a result, the `Dense` modules are not properly initialized and they are recognized as "orphaned" (no parent scope). The canonical way to fix this code is: ``` def setup(self): self.layers = [nn.Dense(5) for _ in range(3)] ``` Requiring the user to understand this distinction causes mental overload, especially since the error message is cryptic. Some suggestions for improvements: 1. Improve the error message by explaining how modules should be assigned to `self` in `setup`. 2. Create a new abstraction `ModuleList`, and only allow lists of Modules here (similar to PyTorch). 3. Convert the list to a some data structure that tracks mutation properly. Option (1) is a quick fix, but doesn't seem like a great long-term solution, since this error can appear in other cases as well, so we want to make sure the error message also covers the other cases. Option (2) doesn't require much mental overload, but the user should remember that this abstraction exists. Option (3) would also work, but I fear that this magic may lead to new special cases in the future that we should address. I personally feel option (2) is most consistent and robust in the long-term. Since it doesn't have to be used in a particular way, it seems also easiest to understand for users.
      author:
         url:https://github.com/marcvanzee
         type:Person
         name:marcvanzee
      datePublished:2020-10-09T12:43:50.000Z
      interactionStatistic:
         type:InteractionCounter
         interactionType:https://schema.org/CommentAction
         userInteractionCount:15
      url:https://github.com/524/flax/issues/524
Person:
      url:https://github.com/marcvanzee
      name:marcvanzee
      url:https://github.com/marcvanzee
      name:marcvanzee
InteractionCounter:
      interactionType:https://schema.org/CommentAction
      userInteractionCount:15
      interactionType:https://schema.org/CommentAction
      userInteractionCount:15

Analytics and Tracking {πŸ“Š}

  • Site Verification - Google

Libraries {πŸ“š}

  • Clipboard.js
  • D3.js
  • GSAP
  • Lodash
  • Moment.js

Emails and Hosting {βœ‰οΈ}

Mail Servers:

  • aspmx.l.google.com
  • alt1.aspmx.l.google.com
  • alt2.aspmx.l.google.com
  • alt3.aspmx.l.google.com
  • alt4.aspmx.l.google.com

Name Servers:

  • dns1.p08.nsone.net
  • dns2.p08.nsone.net
  • dns3.p08.nsone.net
  • dns4.p08.nsone.net
  • ns-1283.awsdns-32.org
  • ns-1707.awsdns-21.co.uk
  • ns-421.awsdns-52.com
  • ns-520.awsdns-01.net
8.75s.