Skip to content

Commit

Permalink
fix: 🐞 temporarly ignore mypy errors for Literal/typer
Browse files Browse the repository at this point in the history
Signed-off-by: Onuralp SEZER <[email protected]>
  • Loading branch information
onuralpszr committed Sep 24, 2024
1 parent 31ad5de commit 304e6b9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions maestro/trainer/models/florence_2/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ def train(
optimizer: Annotated[
str,
typer.Option("--optimizer", help="Optimizer to use for training"),
] = "adamw", # type: ignore
] = "adamw",
lr: Annotated[
float,
typer.Option("--lr", help="Learning rate for the optimizer"),
] = 1e-5,
lr_scheduler: Annotated[
str,
typer.Option("--lr_scheduler", help="Learning rate scheduler"),
] = "linear", # type: ignore
] = "linear",
batch_size: Annotated[
int,
typer.Option("--batch_size", help="Batch size for training"),
Expand Down Expand Up @@ -112,15 +112,15 @@ def train(
bias: Annotated[
str,
typer.Option("--bias", help="Which bias to train"),
] = "none", # type: ignore
] = "none",
use_rslora: Annotated[
bool,
typer.Option("--use_rslora/--no_use_rslora", help="Whether to use RSLoRA"),
] = True,
init_lora_weights: Annotated[
str,
typer.Option("--init_lora_weights", help="How to initialize LoRA weights"),
] = "gaussian", # type: ignore
] = "gaussian",
output_dir: Annotated[
str,
typer.Option("--output_dir", help="Directory to save output files"),
Expand All @@ -138,19 +138,19 @@ def train(
device=torch.device(device),
cache_dir=cache_dir,
epochs=epochs,
optimizer=optimizer,
optimizer=optimizer, # type: ignore
lr=lr,
lr_scheduler=lr_scheduler,
lr_scheduler=lr_scheduler, # type: ignore
batch_size=batch_size,
val_batch_size=val_batch_size,
num_workers=num_workers,
val_num_workers=val_num_workers,
lora_r=lora_r,
lora_alpha=lora_alpha,
lora_dropout=lora_dropout,
bias=bias,
bias=bias, # type: ignore
use_rslora=use_rslora,
init_lora_weights=init_lora_weights,
init_lora_weights=init_lora_weights, # type: ignore
output_dir=output_dir,
metrics=metric_objects,
)
Expand Down

0 comments on commit 304e6b9

Please sign in to comment.