MCPcopy Create free account

hub / github.com/apple/axlearn / functions

Functions7,799 in github.com/apple/axlearn

↓ 6 callersMethod_backend_policy_config
( self, **kwargs, )
axlearn/cloud/gcp/k8s_backend_policy_test.py:14
↓ 6 callersMethod_build_ckpt
( self, *, root_dir: str, mesh_shape: tuple[int, int], mesh_axis_names
axlearn/common/inference_test.py:260
↓ 6 callersMethod_build_container
Builds a config for a single container. Returns: A nested dict corresponding to a k8s Container config.
axlearn/cloud/gcp/jobset_utils.py:620
↓ 6 callersMethod_build_http_route
Builds a config for an HTTPRoute. Returns: A nested dict corresponding to a K8s HTTPRoute config.
axlearn/cloud/gcp/k8s_http_route.py:254
↓ 6 callersFunction_check_conv_cfg
( *, window: Sequence[int], strides: Sequence[int], padding: ConvPaddingType, dilation: Op
axlearn/common/convolution.py:28
↓ 6 callersMethod_check_masking
Check that `tree` is masked correctly. Args: tree: The tree to check. rule: The rule from `cf
axlearn/common/learner_test.py:1501
↓ 6 callersMethod_check_role
Check if current role can perform action.
axlearn/ft/manager.py:244
↓ 6 callersFunction_compute_metrics
Computes zero-shot classification metrics. Args: text_labels: A list of class labels. text_embeddings: A list of embeddings, each
axlearn/common/eval_retrieval_test.py:57
↓ 6 callersFunction_compute_resource
Build gcloud compute v1 API resource. Args: credentials: gcloud credentials used by googleapiclient.discovery. Returns: disco
axlearn/cloud/gcp/vm.py:216
↓ 6 callersFunction_count_batches
(dataset, max_batches=100)
axlearn/vision/input_image_test.py:24
↓ 6 callersMethod_decode_tf
Decodes token IDs back to a string. Args: ids: A tf.Tensor of shape [num_tokens] or [batch, num_tokens] and dtype tf.int32.
axlearn/common/vocabulary_bpe.py:344
↓ 6 callersFunction_default_config_file
Looks up a default config file from package, repo, or relative to CWD.
axlearn/cloud/common/config.py:128
↓ 6 callersFunction_get_launcher_or_exit
Retrieves launcher by matching `action` and flags. If there are multiple matches, the first one in the registry is returned.
axlearn/cloud/gcp/jobs/launch.py:609
↓ 6 callersMethod_grpc_call
Execute a gRPC call with uniform debug logging. Args: hostname: Target hostname. port: Target port. metho
axlearn/ft/manager_client.py:47
↓ 6 callersMethod_health_check_policy_config
( self, **kwargs, )
axlearn/cloud/gcp/k8s_health_check_policy_test.py:20
↓ 6 callersFunction_make_autoregressive_inputs
Produces `input_ids` autoregressively from `target_labels`. NOTE: this performs a conversion from `grain.MapDataset` to `grain.IterDataset`.
axlearn/common/input_grain_lm.py:339
↓ 6 callersMethod_maybe_monitor_goodput
Monitor cumulative goodput if enabled. Instantiate ml-goodput-measurement's GoodputMonitor to asynchronously calculate Goodput, Badpu
axlearn/cloud/gcp/measurement.py:144
↓ 6 callersMethod_maybe_monitor_rolling_window_goodput
Monitor rolling window goodput if enabled.
axlearn/cloud/gcp/measurement.py:182
↓ 6 callersMethod_maybe_publish
(self, job_name: str, *, msg: str, state: JobLifecycleState)
axlearn/cloud/gcp/runners/gke.py:882
↓ 6 callersMethod_mock_config
( self, action="start", runner: Optional[BaseRunnerJob.Config] = _DummyRunner.default_
axlearn/cloud/gcp/jobs/launch_test.py:174
↓ 6 callersMethod_mock_status
(self, *side_effect: tuple[CloudBuildStatus])
axlearn/cloud/gcp/bundler_test.py:124
↓ 6 callersMethod_run
Invokes 'fn' for each sub-layer. Note, the number of sub-layers used for the computation might be smaller than `cfg.num_layers` depen
axlearn/common/repeat.py:170
↓ 6 callersFunction_run_serializer
Asynchronously serializes a list of tensors with _async_serialize.
axlearn/common/array_serialization.py:450
↓ 6 callersMethod_wait_and_close_proc
Cleans up the process/fds and upload logs to gs.
axlearn/cloud/common/bastion.py:1046
↓ 6 callersFunctionadafactor_optimizer
Adafactor optimizer. References: https://arxiv.org/abs/1804.04235 https://github.com/deepmind/optax/blob/c4a4790b85ad69cda00a425cc3dcf9c9
axlearn/common/optimizers.py:1058
↓ 6 callersFunctionadd_decayed_weights
Add parameter scaled by `weight_decay * (learning_rate ** learning_rate_exponent)`. Unlike optax.add_decayed_weights, this supports scaling weigh
axlearn/common/optimizers.py:552
↓ 6 callersMethodadd_flag
Adds a flag to the command group. Args: name: Name of the flag. Should include "--". undefok: If True, the flag will
axlearn/cli/utils.py:189
↓ 6 callersFunctionannotate_stack
A decorator that creates a wrapper around `fn` that annotates the call with annotations given by the supplied keyword arguments. These annota
axlearn/common/traceback_util.py:267
↓ 6 callersFunctionaot_model_analysis
Performs the model analysis on the AOT compiled JAX program. Refer to https://docs.jax.dev/en/latest/jax.stages.html#jax.stages.Compiled Not
axlearn/common/trainer.py:1426
↓ 6 callersFunctionas_schedule_fn
(s: Optional[Schedule])
axlearn/common/schedule.py:25
↓ 6 callersFunctionbatch
Pads or truncates ids so as to divide max length, then group into temporary batch.
axlearn/common/input_lm.py:122
↓ 6 callersFunctionbatch
Returns a function that generates a tf.data.Dataset object. Note: batch(is_training=True) requires sufficient number of examples per host. Wh
axlearn/common/input_tf_data.py:839
↓ 6 callersFunctionbinary_classification_roc_auc_score
Computes Area Under the Receiver Operating Characteristic Curve (ROC AUC) for binary classification model. Reference: https://github.com/
axlearn/common/metrics_classification.py:234
↓ 6 callersMethodbuild_embedder
(dim, num_embeddings, rng, **kwargs)
axlearn/common/layers_test.py:1256
↓ 6 callersMethodbuild_leader_pod
(self)
axlearn/cloud/gcp/pathways_utils.py:1575
↓ 6 callersFunctioncheck
Assert that the trainer config debug string matches the golden file.
axlearn/common/golden_config.py:94
↓ 6 callersFunctionconfusion_matrix
Computes confusion matrix. References: https://github.com/scikit-learn/scikit-learn/blob/baf0ea25d6dd034403370fea552b21a6776bef18/sklearn/met
axlearn/common/metrics_classification.py:23
↓ 6 callersFunctionconv_dilate_window
Returns dilated effective window size. Args: window: convolution window. dilation: convolution dilation. Returns: Th
axlearn/common/convolution.py:101
↓ 6 callersFunctionconv_explicit_padding
Returns the explicit padding for "SAME", "VALID", and "CAUSAL" modes. Each mode follows the formulas below: * SAME: (pad_total//2, pad_total
axlearn/common/convolution.py:119
↓ 6 callersFunctioncopy
Analogous to tf.io.gfile.copy.
axlearn/common/file_system.py:152
↓ 6 callersFunctioncopy_recursively
Sets target[path] = source[path]. Args: source: The source tree. target: The target tree. path: The sequence of keys used
axlearn/common/utils.py:1100
↓ 6 callersFunctioncount_model_params
Count the number of parameters in a model.
axlearn/common/utils.py:1331
↓ 6 callersMethodcreate_for
Creates node pools for the job.
axlearn/cloud/gcp/node_pool_provisioner.py:83
↓ 6 callersFunctioncreate_kv_async_copy_descriptors
(b, h, i, buffer_index)
axlearn/common/flash_attention/tpu_paged_attention_kernel.py:313
↓ 6 callersMethodcreate_method_runner
Creates MethodRunner for the specified method and arguments. Args: method: the method name of self.model to invoke. The method sh
axlearn/common/inference.py:325
↓ 6 callersFunctiondeberta_relative_position_bucket
Computes relative position buckets as seen in DeBERTa. Reference: https://github.com/microsoft/DeBERTa/blob/771f5822798da4bef5147edfe2a4d0e82
axlearn/common/deberta.py:120
↓ 6 callersMethoddecode
Detokenizes int32 iterable to a string, up through first EOS.
axlearn/experiments/text/gpt/vocabulary_fuji_v3.py:64
↓ 6 callersMethoddefault_config
(cls)
axlearn/common/convolution.py:363
↓ 6 callersMethoddefine_flags
(cls, fv)
axlearn/cloud/gcp/jobset_utils_test.py:801
↓ 6 callersFunctiondispatch_input_batch
Constrains all leaf values in the input batch, then (optionally) dispatches examples to a subset along the batch axis. The dispatchings are a
axlearn/common/utils.py:763
↓ 6 callersFunctionevaler_config_dict
Makes evaler configs from the given input sources. Args: input_source_configs: A dictionary with the eval dataset name(s) as key(s) and
axlearn/experiments/text/gpt/common.py:594
↓ 6 callersFunctionflops_loss
The FLOPs loss in 'Minimizing FLOPs to learn efficient sparse representations' ICLR2020. a_j = mean(|a_{ij}|, axis=0) L = sum(a_j^2) Re
axlearn/common/loss.py:843
↓ 6 callersMethodfrom_sequence
Constructs a single combined attention bias of the same type as this class from a sequence of such biases. If the sequence is empty,
axlearn/common/attention_bias.py:163
↓ 6 callersFunctionget_feature_map
Get the feature map function and its backward function.
axlearn/common/rattention/kernels/utils.py:31
↓ 6 callersFunctionget_outer_batch_from_mesh
Infer MoE outer batch size from mesh shape. Args: mesh_axis_names: The name of each mesh axis. outer_batch_axis_names: The names
axlearn/common/mixture_of_experts.py:260
↓ 6 callersMethodinit_states
Initializes cache for autoregressive cached decoding. Args: batch_size: KV cache batch size. max_len: KV cache max le
axlearn/common/attention.py:3566
↓ 6 callersFunctioninput_partition_spec
Returns partition spec for the input batch. We partition the inputs along all axes. For example, if the mesh has shape (64, 4) and axis names
axlearn/common/utils.py:743
↓ 6 callersMethodis_dirty
Return True if git diff or git porcelain are not empty. Raises: NotImplementedError if called on invalid git summary.
axlearn/cloud/common/git_summary.py:220
↓ 6 callersFunctionis_valid_job_name
Ensures job name is not path-like and only contains safe characters. This check should avoid making assumptions about the underlying compute envi
axlearn/cloud/common/bastion.py:420
↓ 6 callersFunctionlarge_margin_cosine_loss
Loss based on https://arxiv.org/pdf/1801.09414.pdf. Assumes that `logits` are cosine distances between examples and class embeddings. Args:
axlearn/common/loss.py:887
↓ 6 callersMethodlookup
Codebook look up with ids. Args: ids: integer tensor of shape [..., num_codebooks] with values in range [0, codeb
axlearn/common/quantizer.py:147
↓ 6 callersFunctionmake_ds_fn
( is_training: bool, texts: list[str], repeat: int = 100 )
axlearn/common/input_test_utils.py:30
↓ 6 callersFunctionmake_segment_mask
Generates attention logit biases given the segment ids. ... such that positions belonging to different segments cannot attend to each other.
axlearn/common/attention_bias.py:885
↓ 6 callersFunctionmakedirs
Analogous to tf.io.gfile.makedirs.
axlearn/common/file_system.py:171
↓ 6 callersFunctionmetric_at_k_name
(name: str, k: int)
axlearn/common/metrics_retrieval.py:652
↓ 6 callersFunctionmock_vm
Mocks out VM get, create, and delete.
axlearn/cloud/gcp/jobs/cpu_runner_test.py:29
↓ 6 callersFunctionms_to_samples
Converts time in milliseconds to number of samples under the given sample rate. Args: ms: Time in milliseconds. sample_rate: Samp
axlearn/audio/frontend_utils.py:80
↓ 6 callersFunctionparse_action
Parses action from argv, or exits with usage info. The action is inferred from the first positional arg in argv[1:] (where argv[0] is interpreted
axlearn/cloud/common/utils.py:218
↓ 6 callersFunctionpredicate
(float32_query: Tensor, top_p: Union[float, Tensor])
axlearn/common/logit_modifiers.py:106
↓ 6 callersFunctionranking_pairwise_loss
Computes pairwise loss among ranked docs (ranks > 0). For every pair of docs (a, b) with 0 < rank_a < rank_b, i.e., (a, b) represent a pair o
axlearn/common/loss.py:1164
↓ 6 callersFunctionsample_contrastive_loss_layer_config
( *, left_encoder_name=LEFT_ENCODER_NAME, right_encoder_name=RIGHT_ENCODER_NAME )
axlearn/common/text_dual_encoder_test.py:78
↓ 6 callersMethodsave_to_dir
Starts a save to the given directories. The writes may happen in the background and not finish until wait_until_finished(). Storage i
axlearn/common/checkpointer.py:314
↓ 6 callersFunctionscale_by_param_block_rms
Scale updates by rms of the gradient for each param vector or matrix. A `block` is here a weight vector (e.g. in a Linear layer) or a weight matr
axlearn/common/optimizers.py:1555
↓ 6 callersFunctionscale_channel
Scale the 2D image using the autocontrast rule.
axlearn/vision/augment.py:454
↓ 6 callersMethodset_defaults
(cls, fv: flags.FlagValues)
axlearn/cloud/gcp/job.py:86
↓ 6 callersFunctionshould_update_with_optimizers
(update_type: UpdateType)
axlearn/common/learner.py:89
↓ 6 callersMethodshould_update_with_optimizers
Returns whether each parameter should be updated with the optimizers. Args: model_params: A nested structure with OptParams as le
axlearn/common/learner.py:234
↓ 6 callersMethodstart
(self)
axlearn/cloud/gcp/vertexai_tensorboard_test.py:25
↓ 6 callersFunctionunbatch
Similar to `input_tf_data.unbatch`. Unlike `batch`, which naively groups top-level elements, unbatch applies to JAX leaves only. For example,
axlearn/common/input_grain.py:324
↓ 6 callersMethodupdate
(self, collection: "OutputCollection")
axlearn/common/module.py:276
↓ 6 callersFunctionwrite_configs_with_header
Writes configs to a file, with a prepended comment warning users not to modify it. Args: config_file: Output file path. configs:
axlearn/cloud/common/config.py:80
↓ 5 callersMethod__init__
Initializes a LoadBalancer instance. Args: jobset_name: Name of the jobset. replicated_job_name: Name of the
axlearn/cloud/gcp/jobset_utils.py:156
↓ 5 callersMethod__init__
(self, cfg: Config, *, parent: Optional[Module])
axlearn/common/state_builder.py:108
↓ 5 callersMethod__init__
(self, cfg: Config, *, parent: Optional[Module])
axlearn/common/input_grain.py:729
↓ 5 callersMethod__init__
(self, cfg: Config, *, parent: Optional[Module])
axlearn/common/bert.py:114
↓ 5 callersMethod_build_failure_policy
Builds the failurePolicy dict for a JobSet spec. Args: replicated_jobs: List of replicated job dicts (each must have a "name" key
axlearn/cloud/gcp/job.py:194
↓ 5 callersMethod_build_main_container
Builds the base container with common elements across all GPU jobs Returns: A nested dict corresponding to a k8s Container config
axlearn/cloud/gcp/jobset_utils.py:1151
↓ 5 callersMethod_build_uploader_container
Builds a config for the uploader container which sync logs to the output dir. The sidecar container runs an loop to periodically sync outputs
axlearn/cloud/gcp/jobset_utils.py:759
↓ 5 callersMethod_build_volumes
Builds a config for volumes.
axlearn/cloud/gcp/jobset_utils.py:1208
↓ 5 callersFunction_calculate_num_tiles
(x: int, tx: int)
axlearn/common/megablock/gmm_gpu.py:89
↓ 5 callersMethod_check_block_size
Returns whether the attention kernel supports the given block size. Args: input_batch: A dict contains input entries, see __call_
axlearn/common/flash_attention/common.py:278
↓ 5 callersFunction_check_or_update
(golden_file: str, actual: str)
axlearn/common/golden_config.py:69
↓ 5 callersMethod_compute_fan_axes
(self, name: str, parameter_spec: ParameterSpec)
axlearn/common/layers.py:1414
↓ 5 callersFunction_compute_moments_with_segment_ids
Computes mean and variance over sequence data. Args: x: inputs tensor of shape [batch_size, seq_len, ...]. segment_ids: An int Te
axlearn/common/layers.py:449
↓ 5 callersMethod_create_layer_parameter_specs
(self)
axlearn/common/layers.py:739
↓ 5 callersFunction_custom_gather
Equivalent to `x.at[idx].get(unique_indices=unique_indices)`, but with a gather-based backward pass. The reason to use this function is that
axlearn/common/mixture_of_experts.py:1944
↓ 5 callersMethod_dispatch_and_combine
Runs forward pass on the linear layers and dispatching and combining.
axlearn/common/mixture_of_experts.py:1622
↓ 5 callersFunction_fake_inputs
( *, batch: int, num_heads: int, kv_len: int, query_len: int, hidden_dim: int, use
axlearn/common/flash_attention/layer_test.py:61
↓ 5 callersMethod_get_test_cloud_build_bundler
(self)
axlearn/cloud/gcp/bundler_test.py:133
↓ 5 callersFunction_infer_cardinality
Returns the size of the dataset, by counting examples if necessary.
axlearn/common/input_tf_data.py:683
← previousnext →401–500 of 7,799, ranked by callers