Skip to content

Nysa/cleaned up ipad#21

Open
nysapk wants to merge 7 commits into
mainfrom
nysa/cleaned-up-ipad
Open

Nysa/cleaned up ipad#21
nysapk wants to merge 7 commits into
mainfrom
nysa/cleaned-up-ipad

Conversation

@nysapk

@nysapk nysapk commented Apr 28, 2026

Copy link
Copy Markdown
Collaborator

cleaned up ipad code a bit

class LitModel(pl.LightningModule):
def __init__(self, model: nn.Module, lr: float, lr_vision: float | None = None, rfs_weight: float = 0.0):
def __init__(
self,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of making these args in the LitModel, create an iPadConfig class that contains all of these, in the same file as the iPad class definition, so that it can just reference the class.

pred_scores = outputs.get("scores", None)
pred_traj_flat = outputs.get("trajectory_flat", None)
query_for_score = outputs.get("query_for_score", None)
pred_scores = None

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably want a way to handle this without breaking what was already there

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plz don't delete stuff randomly

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't think we need this to be in the main branch, i realize you were debugging but it makes it messier

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no reason there should be any diff on this file? maybe you need to merge in the current main

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please do not commit sbatch scripts

Comment thread src/camera-based-e2e/models/transfuser Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think you need to merge in main

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^

Comment thread src/camera-based-e2e/CHANGES.md Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok we can definitely remove this 😭

Comment thread src/camera-based-e2e/debug_viz.py Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't think this necessarily needs to make it to main either

parser.add_argument('--batch_size', type=int, default=16, help='Batch size for training')
parser.add_argument('--lr', type=float, default=1e-4, help='Learning rate')
parser.add_argument('--max_epochs', type=int, default=10, help='Number of epochs to train')
parser.add_argument('--num_proposals', type=int, default=16, help='Number of proposals (proposal model only)')

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again i dont want to add a ton of args to the train script so instead add them to a config dataclass

Comment thread src/camera-based-e2e/viz.py Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its deleted so probably need to merge in main

Comment thread environment.yml Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete plz

pratyushmathur1 and others added 3 commits April 30, 2026 16:02
…d code

- Remove debug_callbacks.py, debug_viz.py (debugging artifacts not for main)
- Remove CHANGES.md, environment.yml (reviewer requested removal)
- Remove run_train_proposal.sbatch and run_train_proposal_login_gpu.sh (no sbatch/scripts in main)
- Restore monocular.py, viz.py, and models/transfuser to match main (no reason for diff)
- Restore pred_traj_flat, query_for_score variables and dict extraction in base_model.py
- Add back type annotations and descriptive ValueError messages in base_model.py

Made-with: Cursor
…riority

- Add IPadConfig dataclass in proposal_planner.py bundling all iPad-specific
  loss/scorer hyperparameters (matches reviewer request to keep config in
  same file as the iPad model class).
- LitModel now accepts a single ipad_config argument instead of 17 individual
  kwargs. Defaults are preserved via the dataclass defaults; hparams are
  populated from the config so all internal getattr lookups still work.
- train.py constructs an IPadConfig only for the proposal model.
- Restore original IMAGES-first batch key priority in _shared_step so existing
  IMAGES batches keep their previous code path (per reviewer feedback).
- Drop --debug / --debug_log_every flags and references to deleted
  debug_callbacks / debug_viz modules from train.py.

Made-with: Cursor
create_vocab.py:
  - Trivial trailing-comma comment difference, resolved.

base_model.py:
  - LitModel.__init__: combine ipad_config hparam approach with main's
    has_nvjpeg flag and model.cfg introspection for wandb logging.
  - decode_batch_jpeg: take main's improved signature (device param,
    cam_idxs_used selection, nvjpeg fallback on AMD GPU).
  - Output dict handling: keep PR's raw_output + proposal_list approach.
  - Score loss: unify iPad BCE/CE scorer (PR) with legacy ScorerModel
    mse/reinforce/margin path (main) via model_cfg_loss_type hparam.
  - Total loss: keep PR's already-computed formula, drop main's duplicate.
  - log_dict: combine PR's refinement oracle ADEs with main's scorer_metrics
    update + batch_size/sync_dist args.

train.py:
  - Remove duplicate import os.
  - Keep PR's ProposalPlanner/IPadConfig imports + iPad argparse flags.
  - Add HomogeneousConcatBatchSampler from main for multi-dataset support.
  - Add --dataset flag from main (waymo/nuscenes/all).
  - Keep PR's --model_type / backbone selection; capture model name for
    dynamic run timestamp.
  - Logger: keep --no_wandb toggle; use main's dynamic timestamp and ddp
    strategy; add use_distributed_sampler + torch.set_float32_matmul_precision.
  - Callbacks: use main's inline ModelCheckpoint style.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants