-
Notifications
You must be signed in to change notification settings - Fork 34.1k
FSDP + TP & native save/load distributed #45028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
133 commits
Select commit
Hold shift + click to select a range
7c84339
init
3outeille 69bc48e
Merge branch 'main' into distributed_api
3outeille b7ec958
Merge branch 'main' into distributed_api
3outeille 45a01a5
Merge remote-tracking branch 'origin/main' into distributed_api
3outeille a5c2554
FSDP2 (fully_shard) integration
3outeille 739332c
DistributedConfig + shard-on-read loading
3outeille 11b55a2
TPStyle API + dense model tensor parallelism
3outeille eeefc9e
Merge branch 'main' into distributed_api
3outeille 9038475
Merge branch 'distributed_api' into fsdp-vs-ddp
3outeille abfd57e
revert some files
3outeille 23a2c05
Merge branch 'fsdp-vs-ddp' of https://github.com/huggingface/transfor…
3outeille c33873e
Add distributed training scripts
3outeille e783231
Merge branch 'distributed_api' of https://github.com/huggingface/tran…
3outeille 34db840
Remove train_fsdp_tp_torchtitan_style.py
3outeille 6f9e2b6
unify the utils for fsdp
3outeille 5e017cf
Merge branch 'distributed_api' into fsdp-vs-ddp
3outeille 37dcc14
Fix CI: re-export moved FSDP utils + remove stale type: ignore
3outeille c1dab9e
Merge branch 'fsdp-vs-ddp' into fsdp-core-model-loading
3outeille e0c4e06
Merge branch 'fsdp-core-model-loading' into refactor-tp-dtensor
3outeille 21f0561
Fix ruff formatting in core_model_loading.py
3outeille cd45107
Fix ruff linting and formatting
3outeille 52c390f
Merge branch 'fsdp-core-model-loading' into refactor-tp-dtensor
3outeille ba3990f
Backport new TP/FSDP API from orchestration-save-load branch
3outeille 92a3491
Fix DTensor imports in Copied-from model files
3outeille 7ca7911
MoE expert parallelism + sequence parallelism (#45408)
3outeille d4400d5
do monkey patching for rotary
3outeille 6793503
Revert modeling file diffs to match fsdp-core-model-loading base
3outeille b943512
Migrate all model TP plans from strings to TPStyle
3outeille 5ce6faa
Restore mxfp4.py to match base branch
3outeille b694f36
Drop mla_kv_a_proj and moe_identity_expert from TP plans
3outeille 1b82460
more comments
3outeille 48f8d6f
fix tp for most models. PyTorch doesn't implement all placement conv…
3outeille 91b4824
fix tp through _replicate_dtensor
3outeille 44706eb
revert small change
3outeille aa45f5b
push temporary fix for TP and strided shard for backward
3outeille 0a566c5
refactor a bit
3outeille 11a55d4
patches for rotary
3outeille 53490d9
refactor MoEExpertsParallel
3outeille 0c09915
fix tp for last models
3outeille ebd03ec
refactor moe expert parallels
3outeille c08c071
linting
3outeille 4804d0d
add sp plan for models
3outeille 1a51928
add deepseek v2 sp plan
3outeille fd3a722
undo sp plan for some tricky models
3outeille 253b89e
remove lm_head from config
3outeille 3ff1fee
first pass of refactoring dtensor shard operator
3outeille 4d96b2d
better refacto
3outeille 04521bf
batter explanation of DtensorShardOperation
3outeille f710f0d
refactor dtensor test to reflect real world scenario
3outeille a35993c
more comments
3outeille 8529d7c
fix tp olmo hybrid and exaone
3outeille 43b792b
Enhance tensor parallel weight tying logic to prevent clobbering of l…
3outeille 0dbef90
fix fsdp mixin test due to missing args
3outeille da83f32
fix test non model
3outeille 3903757
skip sp plan for exaone and olmo hybrid
3outeille e51f663
linting
3outeille 96f3f29
fix import for ci
3outeille dfb448e
test distributed config
3outeille 0a74b7d
attempt to fix guarding import ci
3outeille c50e49c
fix ci check repro
3outeille f9daf7b
add ALL_PARALLEL_STYLES registry alongside TPStyle
3outeille 8a1a9e5
route apply_tensor_parallel through ALL_PARALLEL_STYLES
3outeille 7819783
migrate modular files to string-based TP plans
3outeille e70ac37
migrate standalone configs and modelings to string-based TP plans
3outeille 061d4e6
delete TPStyle dataclass
3outeille 8e0f60c
fix use_local_output defaults for SequenceParallel and PrepareModuleI…
3outeille 5b336bd
use parallel style from torch
3outeille 465d029
revert changes in weight converter
3outeille bc6d6f9
remove dead code in set_param_for_module
3outeille f305f92
remove dead code
3outeille 39db8c1
cleaning again
3outeille 951d4ae
cleaning
3outeille 1b040ef
revert change
3outeille 85ef27c
linting
3outeille 1fd7b1d
refactor dtensor shard ops
3outeille 4547eb3
revert some stuff in core model loading
3outeille 43086d3
core model loading clean
3outeille 1b7ebe1
guarding import
3outeille 6d86746
better separation tensor parall and generic utils
3outeille ff49346
isolate DtensorShardOperation into a separate file
3outeille a806b3d
no need to patch rotary
3outeille 98d2dc5
better seperation
3outeille 14e02aa
simplify gather_full_state_dict
3outeille 9acf944
simplify _replicate_dtensor
3outeille 20cf4e8
fix and clean _replicate_dtensor
3outeille ca6d06b
better doc for DtensorShardOperation
3outeille 7e2115f
fix saving optimizer with DCP for fused weights
3outeille 1c6f848
save_pretrained(distributed_checkpoint=true)
3outeille 41bc6eb
linting
3outeille 27fc8a9
refactor into a single function _dtensor_from_local_like
3outeille 1e25f1f
zeros_like instead of empty_like
3outeille 7405892
move tp and fsdp under distributed
3outeille ed45c91
distribute_model
3outeille f97c3a4
fix deadlock when saving
3outeille b59c4bf
clip grad norm function
3outeille 242e814
maybe_disable_foreach_and_fused_for_mixed_dtensor_groups
3outeille 8fe831f
better TP api for ease of understanding
3outeille bf30f0a
remove shard_param to make it easier
3outeille 261c59b
fix import in test
3outeille f0f5f67
_swap_dtensor_params_for_local
3outeille c135d0e
fix qwen3 nanochat dots1
3outeille 10c6563
Merge branch 'main' into fsdp-vs-ddp
3outeille 5db32b8
Merge branch 'fsdp-vs-ddp' into refactor-tp-dtensor
3outeille 920ade5
add tpu
3outeille 13646c8
move TP refactor experimentation scripts to backup branch
3outeille c49e9ab
linting
3outeille a4c6ba8
register distributed sharding_utils and utils in __init__
3outeille 65b0311
rename TP plan styles to match new ALL_PARALLEL_STYLES registry
3outeille dbf0c60
enable EP
3outeille 51068ca
Add enable_expert_parallel configuration option in test_distributed_c…
3outeille bf0696f
no more auto mode
3outeille d13ab2e
edit fsdp plan to every other models
3outeille 4165209
update fsdp mixin tests
3outeille 6f5dbfb
linting
3outeille d075668
fix test fsdp
3outeille 9472436
fsdp linting
3outeille 9a835eb
revert gitignore
3outeille 86dc7b4
_apply within for loop
3outeille 9378ccb
rename
3outeille e878594
doc sp plan
3outeille 8caa870
fix
3outeille e0e787b
unified settattr + torch no grad + _local_tensor
3outeille 9158d99
revert
3outeille 1c8203a
linting
3outeille 7fb37af
Merge branch 'main' into refactor-tp-dtensor
3outeille 0fdc61f
Merge branch 'main' into refactor-tp-dtensor
3outeille 7e2f686
fix ruff
3outeille e6484d3
make check-repository-consistency
3outeille 4b649ed
trigger fsdp mixin test in CI
3outeille 5d673d3
Merge branch 'main' into refactor-tp-dtensor
3outeille 6b835cb
fix fsdp ci
3outeille a38bc32
Merge branch 'refactor-tp-dtensor' of https://github.com/huggingface/…
3outeille d563a9c
Reset tests/test_modeling_common.py to main
3outeille File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,8 +30,8 @@ | |
|
|
||
| import torch | ||
|
|
||
| from .distributed.sharding_utils import DtensorShardOperation, _dtensor_from_local_like | ||
| from .integrations.accelerate import get_device, offload_weight | ||
| from .integrations.tensor_parallel import ALL_PARALLEL_STYLES | ||
| from .utils import is_env_variable_true | ||
| from .utils.loading_report import LoadStateDictInfo | ||
| from .utils.logging import get_logger, tqdm | ||
|
|
@@ -40,10 +40,10 @@ | |
| _torch_distributed_available = torch.distributed.is_available() | ||
|
|
||
| if TYPE_CHECKING: | ||
| from .integrations.tensor_parallel import TensorParallelLayer | ||
| from .modeling_utils import LoadStateDictConfig, PreTrainedModel | ||
| from .quantizers import HfQuantizer | ||
|
|
||
| elif _torch_distributed_available: | ||
| from torch.distributed.tensor import DTensor | ||
|
|
||
| logger = get_logger(__name__) | ||
|
|
||
|
|
@@ -384,7 +384,7 @@ def __init__(self): | |
|
|
||
| def _apply(self, tensor: torch.Tensor) -> torch.Tensor: | ||
| dim1, dim2 = tensor.shape | ||
| n_heads = self.config.getattr("num_attention_heads", 1) | ||
| n_heads = getattr(self.config, "num_attention_heads", 1) | ||
|
|
||
| tensor = tensor.view(n_heads, dim1 // n_heads // 2, 2, dim2) | ||
| tensor = tensor.transpose(1, 2).reshape(dim1, dim2) | ||
|
|
@@ -400,11 +400,10 @@ def convert( | |
| **kwargs, | ||
| ) -> dict[str, list[torch.Tensor]]: | ||
| self.config = config | ||
| output: dict[str, list[torch.Tensor]] = {} | ||
| output = {} | ||
| for key, tensors in input_dict.items(): | ||
| if len(tensors) != 1: | ||
| raise ValueError("PermuteForRope expects a single tensor per key.") | ||
| output[key] = [self._apply(tensors[0])] | ||
| tensor = tensors[0] if isinstance(tensors, list) else tensors | ||
| output[key] = self._apply(tensor) | ||
| return output | ||
|
|
||
|
|
||
|
|
@@ -605,7 +604,7 @@ def __init__(self, source_patterns: str | list[str], target_patterns: str | list | |
| self._original_target_patterns = self.target_patterns.copy() | ||
|
|
||
| # Init fields that will be used during conversion | ||
| self.distributed_operation: TensorParallelLayer | None = None | ||
| self.distributed_operation: Any = None | ||
| self.quantization_operation: ConversionOps | None = None | ||
| self.collected_tensors: dict[str, list[Future]] = defaultdict(list) | ||
| self.layer_targets: dict[str, set[str]] = defaultdict(set) | ||
|
|
@@ -750,7 +749,9 @@ def reverse_transform(self) -> WeightTransform: | |
| kwargs["operations"] = [op.reverse_op for op in self.operations[::-1]] | ||
|
|
||
| reverse_transform = self.__class__( | ||
| source_patterns=self._original_target_patterns, target_patterns=self._original_source_patterns, **kwargs | ||
| source_patterns=self._original_target_patterns, | ||
| target_patterns=self._original_source_patterns, | ||
| **kwargs, | ||
| ) | ||
| reverse_transform.scope_prefix = self.scope_prefix | ||
| return reverse_transform | ||
|
|
@@ -775,7 +776,7 @@ def materialize_tensors(self) -> dict[str, list[torch.Tensor]]: | |
| tensors = [future.result() for future in tensors if future.result() is not None] | ||
| # Sync loading | ||
| elif callable(tensors[0]): | ||
| tensors = [func() for func in tensors] | ||
| tensors = [tensor for func in tensors if (tensor := func()) is not None] | ||
| # Add them to the new dictionary | ||
| collected_tensors[key] = tensors | ||
|
|
||
|
|
@@ -977,36 +978,26 @@ def spawn_materialize( | |
| tensor: torch.Tensor, | ||
| device=None, | ||
| dtype=None, | ||
| sharding_op: DtensorShardOperation | None = None, | ||
| tensor_idx: int | None = None, | ||
| ) -> Future | Callable: | ||
| """Materialize a tensor from file asynchronously if `thread_pool` is provided, or return a Callable that will | ||
| load the tensor synchronously when called.""" | ||
| """Materialize (and optionally shard) a tensor, asynchronously if a thread pool is provided. | ||
|
|
||
| def _job(): | ||
| return _materialize_copy(tensor, device, dtype) | ||
|
|
||
| if thread_pool is not None: | ||
| return thread_pool.submit(_job) | ||
| else: | ||
| # Return the Callable here, not the Tensor itself, so we actually delay loading to avoid saturating cpu | ||
| # memory during Conversion | ||
| return _job | ||
|
|
||
|
|
||
| def spawn_tp_materialize( | ||
| thread_pool: ThreadPoolExecutor | None, tensor: torch.Tensor, sharding_method, tensor_idx, device=None, dtype=None | ||
| ) -> Future | Callable: | ||
| """Materialize and shard a tensor (according to the TP-plan) from file asynchronously if `thread_pool` is provided, or | ||
| return a Callable that will load the tensor synchronously when called.""" | ||
| When ``sharding_op`` is given the tensor is sharded according to the DTensor | ||
| placement strategy; otherwise it is simply copied to *device*/*dtype*. | ||
| Without a thread pool a deferred callable is returned instead of a Future. | ||
| """ | ||
|
|
||
| def _job(): | ||
| return sharding_method.shard_tensor(tensor, tensor_idx=tensor_idx, device=device, dtype=dtype) | ||
| if sharding_op is not None: | ||
| return sharding_op.shard_tensor(tensor, tensor_idx=tensor_idx, device=device, dtype=dtype) | ||
| return _materialize_copy(tensor, device, dtype) | ||
|
|
||
| if thread_pool is not None: | ||
| return thread_pool.submit(_job) | ||
| else: | ||
| # Return the Callable here, not the Tensor itself, so we actually delay loading to avoid saturating cpu | ||
| # memory during Conversion | ||
| return _job | ||
| # Return the Callable here, not the Tensor itself, so we actually delay loading | ||
| # to avoid saturating cpu memory during Conversion | ||
| return _job | ||
|
|
||
|
|
||
| def dot_natural_key(s: str): | ||
|
|
@@ -1072,12 +1063,12 @@ def _format_op_name(curr_op: list[ConversionOps] | ConversionOps | None) -> str | |
| raise SkipParameters() | ||
|
|
||
|
|
||
| @torch.no_grad() | ||
| def set_param_for_module( | ||
| model: PreTrainedModel, | ||
| target_name: str, | ||
| param_value: torch.Tensor, | ||
| loading_info: LoadStateDictInfo, | ||
| distributed_operation: TensorParallelLayer | None, | ||
| hf_quantizer: HfQuantizer, | ||
| ): | ||
| module_path, _, param_name = target_name.rpartition(".") | ||
|
|
@@ -1092,27 +1083,25 @@ def set_param_for_module( | |
| if ref is None: | ||
| loading_info.unexpected_keys.add(target_name) | ||
| else: | ||
| if not isinstance(param_value, torch.nn.Parameter): | ||
| if not isinstance(param_value, torch.nn.Parameter) and not isinstance(ref, DTensor): | ||
| if param_name not in module_obj._buffers: | ||
| param_value = torch.nn.Parameter(param_value, requires_grad=param_value.is_floating_point()) | ||
|
|
||
| # Remove from missing keys (it's either mismatched, or all good) | ||
| loading_info.missing_keys.discard(target_name) | ||
|
|
||
| # Determine expected shape: for TP, use sharded shape; otherwise, use full shape | ||
| if distributed_operation is not None: | ||
| expected_shape = torch.Size(distributed_operation.get_expected_sharded_shape(ref.shape)) | ||
| else: | ||
| expected_shape = ref.shape | ||
| expected_shape = ref._local_tensor.shape if isinstance(ref, DTensor) else ref.shape | ||
|
|
||
| if ref is not None and param_value.shape != expected_shape and hf_quantizer is None: | ||
| loading_info.mismatched_keys.add((target_name, param_value.shape, expected_shape)) | ||
| else: | ||
| if isinstance(ref, DTensor): | ||
| local_param = param_value.detach() if isinstance(param_value, torch.nn.Parameter) else param_value | ||
| dtensor_param = _dtensor_from_local_like(local_param, ref) | ||
| param_value = torch.nn.Parameter(dtensor_param, requires_grad=ref.requires_grad) | ||
| # super important otherwise _init_weight will re-init the param | ||
| param_value._is_hf_initialized = True | ||
| setattr(module_obj, param_name, param_value) | ||
|
Comment on lines
+1101
to
+1104
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NICE |
||
| if distributed_operation is not None: | ||
| distributed_operation.update_module_attributes(module_obj) | ||
|
|
||
|
|
||
| def offload_and_maybe_resave_param( | ||
|
|
@@ -1294,10 +1283,21 @@ def convert_and_load_state_dict_in_model( | |
| """ | ||
| prefix = model.base_model_prefix | ||
| tp_plan = tp_plan or {} | ||
| device_map = load_config.device_map or {"": "cpu"} | ||
| hf_quantizer = load_config.hf_quantizer | ||
| dtype = load_config.dtype | ||
| device_mesh = load_config.device_mesh | ||
|
|
||
| if load_config.device_map is not None: | ||
| device_map = load_config.device_map | ||
| elif device_mesh is not None: | ||
| if device_mesh.device_type == "cpu": | ||
| device_map = {"": torch.device("cpu")} | ||
| else: | ||
| device_map = { | ||
| "": torch.device(device_mesh.device_type, getattr(torch, device_mesh.device_type).current_device()) | ||
| } | ||
| else: | ||
| device_map = {"": "cpu"} | ||
|
Comment on lines
+1290
to
+1300
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. check if can be reverted cuz this should be covered |
||
| disk_offload_folder = load_config.disk_offload_folder | ||
| offload_buffers = load_config.offload_buffers | ||
| dtype_plan = load_config.dtype_plan or {} | ||
|
|
@@ -1332,10 +1332,6 @@ def convert_and_load_state_dict_in_model( | |
| converters = [entry for entry in weight_mapping if isinstance(entry, WeightConverter)] | ||
| param_name_to_load: dict[str, WeightRenaming | WeightConverter] = {} | ||
|
|
||
| # build '(?P<g0>.*.*\\.block_sparse_moe\\..*)' and group to source {'g0': '*.block_sparse_moe.'} | ||
| # and target to source {'g0': '*.mlp.'}. This allows us to quickly find which pattern matched. | ||
| if tp_plan != {}: | ||
| tp_plan_alt, tp_plan_by_group_name, _ = build_glob_alternation(list(tp_plan.keys())) | ||
| if dtype_plan != {}: | ||
| dtype_policy_alt, dtype_policy_by_group_name, _ = build_glob_alternation(list(dtype_plan.keys())) | ||
|
|
||
|
|
@@ -1399,32 +1395,23 @@ def convert_and_load_state_dict_in_model( | |
| elif empty_param is not None and empty_param.dtype != _dtype: | ||
| _dtype = empty_param.dtype # usually correct when initializing | ||
|
|
||
| # 4. Handle TP sharding or device_map placement | ||
| future_or_tensor = None | ||
| if device_mesh and tp_plan: | ||
| if matched_tp_pattern := tp_plan_alt.search(renamed_key): | ||
| matched_tp_pattern = tp_plan_by_group_name[matched_tp_pattern.lastgroup] | ||
| if getattr(mapping, "distributed_operation", None) is None: | ||
| tp_layer = ALL_PARALLEL_STYLES[model.tp_plan[matched_tp_pattern]].__class__ | ||
| mapping.distributed_operation = tp_layer( | ||
| device_mesh=device_mesh, rank=device_mesh.get_local_rank(), empty_param=empty_param.clone() | ||
| ) | ||
| shard_index = ( | ||
| len(mapping.collected_tensors.get(source_pattern, [])) | ||
| if isinstance(mapping, WeightConverter) and isinstance(mapping.operations[0], MergeModulelist) | ||
| else None | ||
| ) | ||
| future_or_tensor = spawn_tp_materialize( | ||
| thread_pool, | ||
| tensor, | ||
| mapping.distributed_operation, | ||
| shard_index, | ||
| device_map[""], | ||
| _dtype, | ||
| ) | ||
|
|
||
| if future_or_tensor is None: | ||
| param_device = get_device(device_map, renamed_key, valid_torch_device=True) | ||
| # 4. Materialize tensor — shard-on-read for DTensor params, plain copy otherwise | ||
| param_device = get_device(device_map, renamed_key, valid_torch_device=True) | ||
|
3outeille marked this conversation as resolved.
|
||
| if isinstance(empty_param, DTensor): | ||
|
3outeille marked this conversation as resolved.
|
||
| tensor_idx = ( | ||
| len(mapping.collected_tensors.get(source_pattern, [])) | ||
| if isinstance(mapping, WeightConverter) and isinstance(mapping.operations[0], MergeModulelist) | ||
| else None | ||
| ) | ||
| future_or_tensor = spawn_materialize( | ||
| thread_pool, | ||
| tensor, | ||
| param_device, | ||
| _dtype, | ||
| sharding_op=DtensorShardOperation(empty_param), | ||
|
3outeille marked this conversation as resolved.
|
||
| tensor_idx=tensor_idx, | ||
| ) | ||
| else: | ||
| future_or_tensor = spawn_materialize(thread_pool, tensor, param_device, _dtype) | ||
|
|
||
| mapping.add_tensor(renamed_key, original_key, source_pattern, future_or_tensor) | ||
|
|
@@ -1454,14 +1441,7 @@ def convert_and_load_state_dict_in_model( | |
| target_name, param, loading_info, disk_offload_folder, disk_offload_index, mapping | ||
| ) | ||
| else: | ||
| set_param_for_module( | ||
| model, | ||
| target_name, | ||
| param, | ||
| loading_info, | ||
| mapping.distributed_operation, | ||
| hf_quantizer, | ||
| ) | ||
| set_param_for_module(model, target_name, param, loading_info, hf_quantizer) | ||
|
|
||
| # Cleanup all the tensors that were gathered before next iteration | ||
| del realized_value | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.