Add ruff and ty as dev dependencies, fix lint/type findings
ruff removed unused imports across analysis.py and several test files. ty caught a wrong dict[int, int] annotation on StreamingStepsDataset's mat_map (materials are strings) and a real bug in steps_to_parquet.py where --compression none passed None to polars' write_parquet, which only accepts the literal "uncompressed". Also narrows a few Optional-typed attributes (ddpm_schedule, Normalizer.mean/std) with asserts and aligns __getitem__'s parameter name with torch's Dataset base class. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,6 @@ import matplotlib
|
||||
matplotlib.use("Agg") # no display needed for plot smoke tests
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import pyarrow as pa
|
||||
import pyarrow.parquet as pq
|
||||
import pytest
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import numpy as np
|
||||
import pytest
|
||||
from giant.data.dataset import StepsDataset, train_val_split
|
||||
|
||||
|
||||
|
||||
+1
-2
@@ -1,8 +1,7 @@
|
||||
import torch
|
||||
import pytest
|
||||
from giant.model.network import DenoisingMLP
|
||||
from giant.model.schedule import CosineSchedule, flow_matching_loss
|
||||
from giant.sample import sample_flow, sample_ddpm, sample_ddim
|
||||
from giant.sample import sample_flow, sample_ddim
|
||||
|
||||
|
||||
def _small_model():
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import torch
|
||||
import pytest
|
||||
from giant.model.network import DenoisingMLP, SinusoidalEmbedding
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import numpy as np
|
||||
import pytest
|
||||
from giant.data.transforms import (
|
||||
inv_log_transform,
|
||||
local_frame_rotation,
|
||||
|
||||
Reference in New Issue
Block a user