Skip to content

Commit 93da5f1

Browse files
yy-code-nvclaude
andcommitted
Release: scrub docstring URLs; drop cluster/unittest from migration
- Loosened REPLACE-NEXT semantics in the rewriter pick up the next *matching* line; lets a directive placed above a docstring scrub URLs inside it. Applied to avae.py and utils/misc.py to scrub two internal gitlab-master.nvidia.com URLs that previously survived in module/class docstrings. - cluster.py and unittest.py removed from cosmos_framework/configs/base/defaults/ and excluded from the release mapping (CF-owned going forward). - Other small updates picked up from current i4 source. No dangling imports. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5f7b75d commit 93da5f1

10 files changed

Lines changed: 11 additions & 99 deletions

File tree

cosmos_framework/auxiliary/guardrail/common/presets.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
from cosmos_framework.auxiliary.guardrail.common.core import GuardrailRunner
88
from cosmos_framework.auxiliary.guardrail.face_blur_filter.face_blur_filter import RetinaFaceFilter
99
from cosmos_framework.auxiliary.guardrail.qwen3guard.qwen3guard import Qwen3Guard
10-
from cosmos_framework.auxiliary.guardrail.video_content_safety_filter.video_content_safety_filter import (
11-
VideoContentSafetyFilter,
12-
)
1310
from cosmos_framework.utils import log
1411

1512

@@ -27,9 +24,9 @@ def create_video_guardrail_runner(offload_model_to_cpu: bool = False) -> Guardra
2724
"""Create the video guardrail runner."""
2825
return GuardrailRunner(
2926
safety_models=[
30-
#VideoContentSafetyFilter(offload_model_to_cpu=offload_model_to_cpu)
27+
# VideoContentSafetyFilter(offload_model_to_cpu=offload_model_to_cpu)
3128
# Too many false positives, add back when fixed
32-
],
29+
],
3330
postprocessors=[RetinaFaceFilter(offload_model_to_cpu=offload_model_to_cpu)],
3431
)
3532

cosmos_framework/configs/base/config.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ class Config(config.Config):
3838
{"ema": "power"},
3939
{"tokenizer": "wan2pt2_tokenizer"},
4040
{"sound_tokenizer": None}, # Optional: for audio-video generation
41-
{"cluster": "default"},
4241
{"vlm_config": None},
4342
{"ckpt_type": "dcp"},
4443
{"experiment": None},
@@ -72,7 +71,6 @@ def make_config() -> Config:
7271

7372
from cosmos_framework.configs.base.defaults.callbacks import register_callbacks
7473
from cosmos_framework.configs.base.defaults.checkpointer import register_checkpoint, register_ckpt_type
75-
from cosmos_framework.configs.base.defaults.cluster import register_cluster
7674
from cosmos_framework.configs.base.defaults.ema import register_ema
7775

7876
# from cosmos_framework.configs.base.defaults.data import register_data
@@ -92,7 +90,6 @@ def make_config() -> Config:
9290
register_tokenizer()
9391
register_sound_tokenizer()
9492
register_ema()
95-
register_cluster()
9693
register_vlm()
9794

9895
# Register shipped experiments explicitly. (vision_sft_nano also defines

cosmos_framework/configs/base/defaults/cluster.py

Lines changed: 0 additions & 46 deletions
This file was deleted.

cosmos_framework/configs/base/defaults/unittest.py

Lines changed: 0 additions & 32 deletions
This file was deleted.

cosmos_framework/configs/base/defaults/vlm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class VLMConfig:
136136
# HuggingFace model identifier or local path. Drives AutoConfig + AutoModel selection.
137137
model_name: str = ""
138138

139-
# Safetensor path for model for load a safetensor from different folder
139+
# Safetensor path for model for load a safetensor from different folder
140140
safetensors_path: str = ""
141141

142142
# Optional pretrained-weights overlay (separate from the AutoModel structural

cosmos_framework/data/vfm/processors/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ def build_processor(
142142
else:
143143
raise ValueError(f"Tokenizer type {tokenizer_type} not supported")
144144

145+
145146
def build_processor_lazy(
146147
*args,
147148
repository: Optional[str] = None,
@@ -178,4 +179,4 @@ def build_processor_lazy(
178179
if subdir:
179180
local_path = os.path.join(local_path, subdir)
180181
return sys.modules[__name__].build_processor(local_path, **kwargs)
181-
return sys.modules[__name__].build_processor(*args, **kwargs)
182+
return sys.modules[__name__].build_processor(*args, **kwargs)

cosmos_framework/model/vfm/omni_mot_model.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2435,12 +2435,8 @@ def _single_velocity_fn(tokens: list[list[int]], skip_text_tokens: bool):
24352435
# always-on globally) would silently ignore the per-timestep
24362436
# ``guidance_interval`` gate.
24372437
if _dp_shard_group is not None:
2438-
_cfg_t = torch.tensor(
2439-
[1 if needs_cfg else 0], device=_align_device, dtype=torch.int32
2440-
)
2441-
torch.distributed.all_reduce(
2442-
_cfg_t, op=torch.distributed.ReduceOp.MAX, group=_dp_shard_group
2443-
)
2438+
_cfg_t = torch.tensor([1 if needs_cfg else 0], device=_align_device, dtype=torch.int32)
2439+
torch.distributed.all_reduce(_cfg_t, op=torch.distributed.ReduceOp.MAX, group=_dp_shard_group)
24442440
_any_needs_cfg = bool(_cfg_t.item())
24452441
else:
24462442
_any_needs_cfg = needs_cfg
@@ -2480,9 +2476,7 @@ def _single_velocity_fn(tokens: list[list[int]], skip_text_tokens: bool):
24802476
# to pad their FSDP allgather sequence.
24812477
if _dp_shard_group is not None:
24822478
_local_steps_t = torch.tensor([num_steps], device=_align_device, dtype=torch.int32)
2483-
torch.distributed.all_reduce(
2484-
_local_steps_t, op=torch.distributed.ReduceOp.MAX, group=_dp_shard_group
2485-
)
2479+
torch.distributed.all_reduce(_local_steps_t, op=torch.distributed.ReduceOp.MAX, group=_dp_shard_group)
24862480
_max_num_steps = int(_local_steps_t.item())
24872481
else:
24882482
_max_num_steps = num_steps

cosmos_framework/model/vfm/tokenizers/audio/avae.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
"""
55
AVAE (Audio Variational AutoEncoder) Tokenizer for Imaginaire4
6-
ported from https://gitlab-master.nvidia.com/ADLR/bigvgan
6+
ported from https://invalid_url
77
commit hash: 80fbd8cfecb1867cc864e6d4fe0a474d8403a474
88
"""
99

cosmos_framework/tools/visualize/video.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def save_video(grid, video_name, fps=30):
2929
macro_block_size=1,
3030
)
3131

32+
3233
def save_img_or_video(
3334
sample: Tensor, # [C,T,H,W] in [0,1] range
3435
save_fp_wo_ext: Union[str, IO[Any]],

cosmos_framework/utils/misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ def __exit__(self, exc_type, exc_val, exc_tb):
542542

543543
class StragglerDetectorV2:
544544
"""StragglerDetectorV2 is a class that allows you to easily integrate "straggler" tool:
545-
https://gitlab-master.nvidia.com/dl/gwe/fault_tolerance_related/straggler/-/tree/cupti?ref_type=heads.
545+
https://invalid_url.
546546
547547
This tool detects stragglers using low-level CUPTI tool, which can gather kernel execution time with very low overhead.
548548
The execution times are compared across different ranks, as well as to the execution time of the exact same kernels in the past.

0 commit comments

Comments
 (0)