|
1 | 1 | { |
2 | | - "_about": "Risk rules for flax 0.12.x. 'unsafe' = disk/network/host-callback; 'dual_use' = useful surface that is mostly safe but can be abused in combination (the category itself is the caution, so notes stay terse and vague); 'safe' = genuinely inert. Cross-library rules in _common/default are merged in on top of these. This is advisory, not a proof.", |
| 2 | + "_about": "Risk rules for flax 0.12.x. 'unsafe' = disk/network/host-callback; 'safe' = pure computation; 'dual_use' = flagged for a specific capability beyond pure computation, reason stated per entry. Covers the commonly-used flax.linen surface; anything uncatalogued falls through to 'review'. Cross-library rules in _common/default are merged in on top of these. This is advisory, not a proof.", |
3 | 3 | "dual_use": { |
4 | | - "flax.linen.Module": "Flax module base class; required to define a model. Keep allow_base_class_attributes=False to require explicit assignment." |
| 4 | + "flax.linen.Module": "Flax module base class; required to define a model. allow_base_class_attributes widens what the verifier treats as valid attribute access — keep it False to require explicit assignment." |
| 5 | + }, |
| 6 | + "safe": { |
| 7 | + "flax.linen.BatchNorm": "Batch normalization.", |
| 8 | + "flax.linen.Bidirectional": "Bidirectional wrapper running a cell forward and backward.", |
| 9 | + "flax.linen.Conv": "Convolution layer.", |
| 10 | + "flax.linen.ConvLSTMCell": "Convolutional LSTM cell.", |
| 11 | + "flax.linen.ConvLocal": "Locally-connected (unshared-weight) convolution layer.", |
| 12 | + "flax.linen.ConvTranspose": "Transposed (fractionally-strided) convolution layer.", |
| 13 | + "flax.linen.Dense": "Fully-connected (dense) layer.", |
| 14 | + "flax.linen.DenseGeneral": "Dense layer contracting over arbitrary axes.", |
| 15 | + "flax.linen.Dropout": "Stochastic dropout layer.", |
| 16 | + "flax.linen.Einsum": "Einsum layer with a learned operand.", |
| 17 | + "flax.linen.Embed": "Embedding lookup layer.", |
| 18 | + "flax.linen.GRUCell": "GRU recurrent cell.", |
| 19 | + "flax.linen.GroupNorm": "Group normalization.", |
| 20 | + "flax.linen.InstanceNorm": "Instance normalization.", |
| 21 | + "flax.linen.LSTMCell": "LSTM recurrent cell.", |
| 22 | + "flax.linen.LayerNorm": "Layer normalization.", |
| 23 | + "flax.linen.MultiHeadAttention": "Multi-head attention layer.", |
| 24 | + "flax.linen.MultiHeadDotProductAttention": "Multi-head dot-product attention layer.", |
| 25 | + "flax.linen.OptimizedLSTMCell": "LSTM cell with a fused implementation.", |
| 26 | + "flax.linen.PReLU": "Parametric-ReLU activation layer.", |
| 27 | + "flax.linen.Partitioned": "Sharding-metadata wrapper for a parameter; structural annotation.", |
| 28 | + "flax.linen.RMSNorm": "Root-mean-square layer normalization.", |
| 29 | + "flax.linen.RNN": "Recurrent layer applying a cell over a sequence.", |
| 30 | + "flax.linen.SelfAttention": "Multi-head self-attention layer.", |
| 31 | + "flax.linen.Sequential": "Container applying sub-layers in order; the sub-layers are allow-listed separately.", |
| 32 | + "flax.linen.SimpleCell": "Elman (simple) recurrent cell.", |
| 33 | + "flax.linen.SpectralNorm": "Spectral-normalization wrapper.", |
| 34 | + "flax.linen.Variable": "Handle to a module variable; a state reference, not compute or IO.", |
| 35 | + "flax.linen.WeightNorm": "Weight-normalization wrapper.", |
| 36 | + "flax.linen.avg_pool": "Average pooling over windows.", |
| 37 | + "flax.linen.celu": "CELU activation.", |
| 38 | + "flax.linen.checkpoint": "Rematerialization transform (alias of remat); not disk checkpointing.", |
| 39 | + "flax.linen.combine_masks": "Combines boolean masks with logical AND.", |
| 40 | + "flax.linen.compact": "Decorator marking a module's inline-submodule method; structural.", |
| 41 | + "flax.linen.cond": "Lifted conditional executing one of two branches.", |
| 42 | + "flax.linen.dot_product_attention": "Dot-product attention function.", |
| 43 | + "flax.linen.dot_product_attention_weights": "Dot-product attention weights (softmax over scores).", |
| 44 | + "flax.linen.elu": "ELU activation.", |
| 45 | + "flax.linen.gelu": "GELU activation.", |
| 46 | + "flax.linen.glu": "Gated-linear-unit activation.", |
| 47 | + "flax.linen.hard_sigmoid": "Hard-sigmoid activation.", |
| 48 | + "flax.linen.hard_silu": "Hard-SiLU / hard-swish activation.", |
| 49 | + "flax.linen.hard_swish": "Hard-swish / hard-SiLU activation.", |
| 50 | + "flax.linen.hard_tanh": "Hard-tanh activation.", |
| 51 | + "flax.linen.initializers.constant": "Constant-value parameter initializer.", |
| 52 | + "flax.linen.initializers.delta_orthogonal": "Delta-orthogonal initializer for convolution kernels.", |
| 53 | + "flax.linen.initializers.glorot_normal": "Glorot (Xavier) normal initializer.", |
| 54 | + "flax.linen.initializers.glorot_uniform": "Glorot (Xavier) uniform initializer.", |
| 55 | + "flax.linen.initializers.he_normal": "He (Kaiming) normal initializer.", |
| 56 | + "flax.linen.initializers.he_uniform": "He (Kaiming) uniform initializer.", |
| 57 | + "flax.linen.initializers.kaiming_normal": "Kaiming (He) normal initializer.", |
| 58 | + "flax.linen.initializers.kaiming_uniform": "Kaiming (He) uniform initializer.", |
| 59 | + "flax.linen.initializers.lecun_normal": "LeCun normal initializer.", |
| 60 | + "flax.linen.initializers.lecun_uniform": "LeCun uniform initializer.", |
| 61 | + "flax.linen.initializers.normal": "Normal-distribution parameter initializer.", |
| 62 | + "flax.linen.initializers.ones": "All-ones parameter initializer.", |
| 63 | + "flax.linen.initializers.orthogonal": "Orthogonal-matrix parameter initializer.", |
| 64 | + "flax.linen.initializers.truncated_normal": "Truncated-normal parameter initializer.", |
| 65 | + "flax.linen.initializers.uniform": "Uniform-distribution parameter initializer.", |
| 66 | + "flax.linen.initializers.variance_scaling": "Variance-scaling parameter initializer.", |
| 67 | + "flax.linen.initializers.xavier_normal": "Xavier (Glorot) normal initializer.", |
| 68 | + "flax.linen.initializers.xavier_uniform": "Xavier (Glorot) uniform initializer.", |
| 69 | + "flax.linen.initializers.zeros": "All-zeros parameter initializer.", |
| 70 | + "flax.linen.jit": "Lifted JIT compilation of a module.", |
| 71 | + "flax.linen.leaky_relu": "Leaky-ReLU activation.", |
| 72 | + "flax.linen.log_sigmoid": "Log-sigmoid activation.", |
| 73 | + "flax.linen.log_softmax": "Log-softmax activation.", |
| 74 | + "flax.linen.logsumexp": "Log-sum-exp reduction.", |
| 75 | + "flax.linen.make_attention_mask": "Builds an attention mask by broadcasting a query/key position comparison.", |
| 76 | + "flax.linen.make_causal_mask": "Builds a causal (lower-triangular) attention mask from a shape.", |
| 77 | + "flax.linen.map_variables": "Transform mapping over a module's variable collections.", |
| 78 | + "flax.linen.max_pool": "Max pooling over windows.", |
| 79 | + "flax.linen.nowrap": "Decorator opting a method out of module auto-wrapping; structural.", |
| 80 | + "flax.linen.one_hot": "One-hot encoding of integer indices.", |
| 81 | + "flax.linen.pool": "Generic windowed pooling reduction.", |
| 82 | + "flax.linen.relu": "ReLU activation.", |
| 83 | + "flax.linen.relu6": "ReLU6 activation.", |
| 84 | + "flax.linen.remat": "Rematerialization (gradient-checkpointing) transform.", |
| 85 | + "flax.linen.remat_scan": "Rematerialized scan transform.", |
| 86 | + "flax.linen.scan": "Lifted scan over a module along an axis.", |
| 87 | + "flax.linen.selu": "SELU activation.", |
| 88 | + "flax.linen.sigmoid": "Sigmoid activation.", |
| 89 | + "flax.linen.silu": "SiLU / swish activation.", |
| 90 | + "flax.linen.soft_sign": "Soft-sign activation.", |
| 91 | + "flax.linen.softmax": "Softmax activation.", |
| 92 | + "flax.linen.softplus": "Softplus activation.", |
| 93 | + "flax.linen.standardize": "Standardizes to zero-mean, unit-variance along an axis.", |
| 94 | + "flax.linen.swish": "Swish / SiLU activation.", |
| 95 | + "flax.linen.switch": "Lifted multi-branch switch.", |
| 96 | + "flax.linen.tanh": "Hyperbolic-tangent activation.", |
| 97 | + "flax.linen.vmap": "Lifted vectorizing map over a module.", |
| 98 | + "flax.linen.while_loop": "Lifted while loop." |
5 | 99 | }, |
6 | 100 | "unsafe": { |
| 101 | + "flax.io.*": "File IO shim — reads/writes files on disk (and gs:// cloud storage when available).", |
7 | 102 | "flax.serialization.*": "Serializes model state to bytes / disk.", |
8 | 103 | "flax.training.checkpoints.*": "Writes / reads checkpoints to disk (path accepts gs://)." |
9 | 104 | } |
|
0 commit comments