Conversation
89d0f78 to
eba12d2
Compare
There was a problem hiding this comment.
Pull request overview
This PR migrates the repository’s large in-repo tutorial/ example into a standalone recipes/aero_cfd/ recipe and updates the documentation/examples accordingly, while introducing a new statistics-driven FieldNormalizer configuration flow.
Changes:
- Removes the legacy
tutorial/schemas/models/pipeline/README and ports the runnable example torecipes/aero_cfd/(configs, jobs, pipeline, trainer, callbacks). - Adds
FieldNormalizerConfig+FieldNormalizerand wires dataset normalizer instantiation toward statistics-based resolution. - Updates docs, examples, and links to point to the new walkthrough and recipe entry points.
Reviewed changes
Copilot reviewed 95 out of 135 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tutorial/schemas/trainers/automotive_aerodynamics_trainer_config.py | Removed legacy tutorial trainer schema. |
| tutorial/schemas/trainers/init.py | Removed tutorial trainer exports. |
| tutorial/schemas/models/upt_config.py | Removed tutorial model schema. |
| tutorial/schemas/models/transolver_plusplus_config.py | Removed tutorial model schema. |
| tutorial/schemas/models/transolver_config.py | Removed tutorial model schema. |
| tutorial/schemas/models/transformer_config.py | Removed tutorial model schema. |
| tutorial/schemas/models/composite_transformer_config.py | Removed tutorial composite model schema. |
| tutorial/schemas/models/base_config.py | Removed tutorial base model schema. |
| tutorial/schemas/models/any_model_config.py | Removed tutorial AnyModel union schema. |
| tutorial/schemas/models/ab_upt_config.py | Removed tutorial model schema. |
| tutorial/schemas/models/init.py | Removed tutorial model exports. |
| tutorial/schemas/config_schema.py | Removed tutorial root config schema. |
| tutorial/schemas/callbacks/init.py | Removed tutorial callback schema union. |
| tutorial/README.MD | Removed large tutorial README (migrated to docs/recipe). |
| tutorial/pipeline/init.py | Removed tutorial pipeline export. |
| tutorial/model/upt.py | Removed tutorial model wrapper. |
| tutorial/model/transolver.py | Removed tutorial model wrapper. |
| tutorial/model/transformer.py | Removed tutorial model wrapper. |
| tutorial/model/base.py | Removed tutorial base model implementation. |
| tutorial/model/ab_upt.py | Removed tutorial model wrapper. |
| tutorial/model/init.py | Removed tutorial model exports. |
| tutorial/configs/dataset_statistics/wing_stats.yaml | Removed tutorial stats config. |
| tutorial/configs/dataset_statistics/shapenet_car_stats.yaml | Removed tutorial stats config. |
| tutorial/configs/dataset_statistics/drivaernet++_stats.yaml | Removed tutorial stats config. |
| tutorial/configs/dataset_statistics/drivaerml_stats.yaml | Removed tutorial stats config. |
| tutorial/configs/dataset_statistics/ahmedml_stats.yaml | Removed tutorial stats config. |
| tutorial/configs/dataset_normalizers/wing_dataset_normalizers.yaml | Removed tutorial normalizer config. |
| tutorial/configs/dataset_normalizers/shapenet_dataset_normalizers.yaml | Removed tutorial normalizer config. |
| tutorial/configs/dataset_normalizers/caeml_dataset_normalizers.yaml | Removed tutorial normalizer config. |
| tutorial/callbacks/init.py | Removed tutorial callback exports. |
| tests/unit/noether/core/schemas/test_normalizers.py | Added unit tests for FieldNormalizerConfig/FieldNormalizer. |
| src/noether/modeling/models/aerodynamics.py | Adjusted AeroABUPT forward to return only outputs. |
| src/noether/data/preprocessors/normalizers.py | Added FieldNormalizer preprocessor. |
| src/noether/data/datasets/cfd/dataset.py | Added getitem_surface_sdf (normalized via volume_sdf). |
| src/noether/data/datasets/cfd/caeml/drivaerml/dataset.py | Updated dataset config type (StandardDatasetConfig) + safer super init. |
| src/noether/data/datasets/cfd/caeml/ahmedml/dataset.py | Updated dataset config type (StandardDatasetConfig) + safer super init. |
| src/noether/data/base/dataset.py | Adds stats loading + passes stats into normalizer instantiation. |
| src/noether/core/schemas/normalizers.py | Introduced FieldNormalizerConfig and tightened normalizer schemas. |
| src/noether/core/schemas/aero/init.py | Removed export of legacy aero callback config. |
| src/noether/core/schemas/init.py | Exported FieldNormalizerConfig. |
| src/noether/core/presets/base.py | Switched presets to declarative FieldNormalizerConfig mapping. |
| recipes/aero_cfd/trainers/automotive_aerodynamics_cfd.py | Recipe trainer + trainer config schema colocated. |
| recipes/aero_cfd/trainers/init.py | Exposes recipe trainer class. |
| recipes/aero_cfd/README.MD | New recipe README and quickstart. |
| recipes/aero_cfd/pipeline/sample_processors/anchor_point_sampling.py | New recipe sample processor for anchor sampling. |
| recipes/aero_cfd/pipeline/sample_processors/init.py | Exposes recipe sample processors. |
| recipes/aero_cfd/pipeline/multistage_pipelines/aero_multistage.py | New recipe multi-stage pipeline + pipeline config schema. |
| recipes/aero_cfd/pipeline/multistage_pipelines/init.py | Exposes recipe multi-stage pipeline. |
| recipes/aero_cfd/pipeline/init.py | Exposes pipeline config + pipeline class. |
| recipes/aero_cfd/model/composite_transformer.py | Recipe composite transformer port. |
| recipes/aero_cfd/model/composite_components/composite_transformer_block.py | Recipe composite transformer block port. |
| recipes/aero_cfd/model/composite_components/init.py | Exposes composite components. |
| recipes/aero_cfd/model/init.py | Exposes recipe model(s). |
| recipes/aero_cfd/jobs/train_shapenet.job | Updated job script paths to recipe location. |
| recipes/aero_cfd/jobs/train_drivaernet.job | Updated job script paths to recipe location. |
| recipes/aero_cfd/jobs/train_drivaerml.job | Updated job script paths to recipe location. |
| recipes/aero_cfd/jobs/train_ahmedml.job | Updated job script paths to recipe location. |
| recipes/aero_cfd/jobs/experiments/shapenet_experiments.txt | New recipe job-array experiment list. |
| recipes/aero_cfd/jobs/experiments/drivaerml_experiments.txt | New recipe job-array experiment list. |
| recipes/aero_cfd/jobs/experiments/ahmedml_experiments.txt | New recipe job-array experiment list. |
| recipes/aero_cfd/jobs/init.py | Package marker for recipe jobs. |
| recipes/aero_cfd/configs/trainer/shapenet_trainer.yaml | Updated trainer kind/import paths for recipe. |
| recipes/aero_cfd/configs/trainer/caeml_trainer.yaml | Updated trainer kind/import paths for recipe. |
| recipes/aero_cfd/configs/train_wing.yaml | Updated recipe training composition (removed tutorial stats group). |
| recipes/aero_cfd/configs/train_shapenet.yaml | Updated recipe training composition (removed tutorial stats group). |
| recipes/aero_cfd/configs/train_drivaernet.yaml | Updated recipe training composition (removed tutorial stats group). |
| recipes/aero_cfd/configs/train_drivaerml.yaml | Updated recipe training composition (removed tutorial stats group). |
| recipes/aero_cfd/configs/train_caeml.yaml | Updated excluded properties (adds surface_sdf) and recipe defaults. |
| recipes/aero_cfd/configs/train_ahmedml.yaml | Updated recipe training composition (removed tutorial stats group). |
| recipes/aero_cfd/configs/tracker/disabled.yaml | Adds disabled tracker config. |
| recipes/aero_cfd/configs/tracker/development_tracker.yaml | Adds W&B development tracker template. |
| recipes/aero_cfd/configs/slurm/slurm_config.yaml | Adds SLURM defaults for recipe. |
| recipes/aero_cfd/configs/pipeline/shapenet_pipeline.yaml | Updated pipeline kind and removed dataset_statistics wiring. |
| recipes/aero_cfd/configs/pipeline/caeml_pipeline.yaml | Updated pipeline kind and removed dataset_statistics wiring. |
| recipes/aero_cfd/configs/optimizer/lion.yaml | Adds Lion optimizer config. |
| recipes/aero_cfd/configs/optimizer/adamw.yaml | Adds AdamW optimizer config. |
| recipes/aero_cfd/configs/optimizer/adamw_transolver.yaml | Adds Transolver-specific AdamW overrides. |
| recipes/aero_cfd/configs/model/upt.yaml | Points to core aero model wrapper; updates flags. |
| recipes/aero_cfd/configs/model/transolver.yaml | Points to core aero model wrapper. |
| recipes/aero_cfd/configs/model/transformer.yaml | Points to core aero model wrapper. |
| recipes/aero_cfd/configs/model/composite_transformer.yaml | Updates composite model kind for recipe. |
| recipes/aero_cfd/configs/model/ab_upt.yaml | Points to core aero model wrapper. |
| recipes/aero_cfd/configs/experiment/shapenet/upt.yaml | New recipe experiment override. |
| recipes/aero_cfd/configs/experiment/shapenet/transolver.yaml | New recipe experiment override. |
| recipes/aero_cfd/configs/experiment/shapenet/transolver_plusplus.yaml | New recipe experiment override. |
| recipes/aero_cfd/configs/experiment/shapenet/transformer.yaml | New recipe experiment override. |
| recipes/aero_cfd/configs/experiment/shapenet/composite/transformer.yaml | New recipe composite experiment override. |
| recipes/aero_cfd/configs/experiment/shapenet/ab_upt.yaml | New recipe experiment override. |
| recipes/aero_cfd/configs/experiment/emmi_wing/ab_upt.yaml | New recipe wing AB-UPT experiment + chunked inference settings. |
| recipes/aero_cfd/configs/experiment/drivaerml/upt.yaml | New recipe experiment override + inference pipeline settings. |
| recipes/aero_cfd/configs/experiment/drivaerml/transolver.yaml | New recipe experiment override + chunked inference settings. |
| recipes/aero_cfd/configs/experiment/drivaerml/transformer.yaml | New recipe experiment override + chunked inference settings. |
| recipes/aero_cfd/configs/experiment/drivaerml/ab_upt.yaml | New recipe experiment override + chunked inference settings. |
| recipes/aero_cfd/configs/experiment/ahmedml/upt.yaml | New recipe experiment override + inference pipeline settings. |
| recipes/aero_cfd/configs/experiment/ahmedml/transolver.yaml | New recipe experiment override + chunked inference settings. |
| recipes/aero_cfd/configs/experiment/ahmedml/transformer.yaml | New recipe experiment override + chunked inference settings. |
| recipes/aero_cfd/configs/experiment/ahmedml/ab_upt.yaml | New recipe experiment override + chunked inference settings. |
| recipes/aero_cfd/configs/datasets/shapenet_dataset.yaml | New recipe dataset group for ShapeNet. |
| recipes/aero_cfd/configs/datasets/caeml_dataset.yaml | New recipe dataset group for CAEML datasets. |
| recipes/aero_cfd/configs/dataset_normalizers/wing_dataset_normalizers.yaml | New stats-driven normalizers using FieldNormalizer. |
| recipes/aero_cfd/configs/dataset_normalizers/shapenet_dataset_normalizers.yaml | New stats-driven normalizers using FieldNormalizer. |
| recipes/aero_cfd/configs/dataset_normalizers/caeml_dataset_normalizers.yaml | New stats-driven normalizers using FieldNormalizer. |
| recipes/aero_cfd/configs/data_specs/shapenet_car.yaml | New recipe data specs. |
| recipes/aero_cfd/configs/data_specs/emmi_wing.yaml | New recipe data specs. |
| recipes/aero_cfd/configs/data_specs/caeml.yaml | New recipe data specs. |
| recipes/aero_cfd/configs/callbacks/training_callbacks_shapenet.yaml | Updated callback kinds to recipe callback. |
| recipes/aero_cfd/configs/callbacks/training_callbacks_caeml.yaml | Updated callback kinds to recipe callback + chunked inference config. |
| recipes/aero_cfd/configs/init.py | Package marker for recipe configs. |
| recipes/aero_cfd/callbacks.py | Adds recipe AeroMetricsCallback and config schema. |
| recipes/aero_cfd/init.py | Package marker for recipe. |
| README.md | Updates tutorial link + quickstart to recipe. |
| examples/aero_cfd/presets/shapenet_car.py | Updates preset normalizers + callbacks for new callback/config. |
| examples/aero_cfd/presets/emmi_wing.py | Updates preset normalizers for FieldNormalizerConfig. |
| examples/aero_cfd/presets/drivaernet.py | Updates preset normalizers for FieldNormalizerConfig. |
| examples/aero_cfd/presets/drivaerml.py | Updates preset normalizers for FieldNormalizerConfig. |
| examples/aero_cfd/presets/base.py | Switches pipeline config import to recipe pipeline config. |
| examples/aero_cfd/presets/ahmedml.py | Updates preset normalizers for FieldNormalizerConfig. |
| docs/source/tutorials/walkthrough/trainer.rst | New walkthrough docs (trainer). |
| docs/source/tutorials/walkthrough/running_experiments.rst | New walkthrough docs (running experiments). |
| docs/source/tutorials/walkthrough/pipeline.rst | New walkthrough docs (pipeline). |
| docs/source/tutorials/walkthrough/models.rst | New walkthrough docs (models). |
| docs/source/tutorials/walkthrough/introduction.rst | New walkthrough docs (intro). |
| docs/source/tutorials/walkthrough/index.rst | New walkthrough index. |
| docs/source/tutorials/walkthrough/dataset.rst | New walkthrough docs (dataset). |
| docs/source/tutorials/walkthrough/configuration.rst | New walkthrough docs (configuration). |
| docs/source/tutorials/walkthrough/callbacks.rst | New walkthrough docs (callbacks). |
| docs/source/tutorials/training_first_model_with_configs.rst | Updated tutorial references to recipe location. |
| docs/source/tutorials/training_first_model_with_code.rst | Updated tutorial references to recipe location/callback naming. |
| docs/source/tutorials/index.rst | Updates tutorials index to include new walkthrough. |
| docs/source/reference/prerequisites.rst | Adds prerequisites reference page. |
| docs/source/reference/hardware_setup.rst | Updates example commands to recipe config paths. |
| docs/source/index.rst | Updates top-level docs toctrees to include walkthrough + prerequisites placement. |
| docs/source/guides/training/launch_job.rst | Updates SLURM submit example to recipe config path. |
Comments suppressed due to low confidence (4)
recipes/aero_cfd/callbacks.py:16
AeroMetricsCallbackConfig.kindpoints toaero_cfd.callbacks.AeroMetricsCallback, but the recipe is structured so the module is imported ascallbackswhen running fromrecipes/aero_cfd/(as also used in the YAML configs:kind: callbacks.AeroMetricsCallback). The current default kind will fail for code paths that instantiateAeroMetricsCallbackConfigdirectly (e.g., presets/examples).
Align the default kind with the actual import path used by the recipe (or the installed package path if these modules are meant to be imported as recipes.aero_cfd.*).
recipes/aero_cfd/pipeline/multistage_pipelines/aero_multistage.py:28
AeroCFDPipelineConfig.kinddefaults toaero_cfd.pipeline.AeroMultistagePipeline, but the recipe’s configs instantiate the pipeline aspipeline.AeroMultistagePipeline(and the actual module lives underrecipes/aero_cfd/pipeline/). This mismatch will break any code path that relies on the config default (e.g., presets that instantiateAeroCFDPipelineConfig()without overridingkind).
Align the default kind with the import path that is actually valid at runtime for this recipe.
recipes/aero_cfd/model/composite_transformer.py:20
- This module uses import paths / kind strings that don’t appear to match the recipe layout:
from aero_cfd.model.composite_components ...will fail if the recipe is run as instructed (modules aremodel.*/callbacks.*from withinrecipes/aero_cfd/).CompositeTransformerConfig.kindstill points totutorial.models....
Please update imports and default kind values to the actual module paths used by the recipe (or to the installed package path if aero_cfd.* is intended).
recipes/aero_cfd/model/composite_components/composite_transformer_block.py:24
CompositeTransformerBlockConfig.kindis set tomodel.composite_components.CompositeTransformerBlockModel, but this module definesCompositeTransformerBlock(noCompositeTransformerBlockModel). Ifkindis ever used for dynamic instantiation/serialization, this mismatch will cause import/lookup failures.
Consider updating the literal to the actual class path/name (or removing it if the block is never instantiated via kind).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Ndles
left a comment
There was a problem hiding this comment.
all in all I think it's look clean and nicely organized. I need to check how things look compiled locally, but I will do it when you will mark as ready for a review. I learned a few cool things about sphinx docs, thanks! :P
The only thing I am not certain about is the folder naming recipes/aero_cfd and recipes/aero_cfd_python. But I don't have a better alternative right now, so probably not a big deal.
make aero_cfd recipe work move tutorial to docs
| config_schema_kind: tutorial.schemas.config_schema.TutorialConfigSchema | ||
| excluded_properties: | ||
| - volume_sdf | ||
| - surface_sdf |
There was a problem hiding this comment.
Where is this coming from? This is 0 by default?
There was a problem hiding this comment.
We previously added it in the pipeline. However I wanted to remove the statistics from the config, and the pipeline was depending on the statistics and this was only used to get the volume_sdf statistics for normalization. By moving it to the dataset we can reuse the same normalizer as for the volume_sdf.
| @with_normalizers("volume_sdf") | ||
| def getitem_surface_sdf(self, idx: int) -> torch.Tensor: | ||
| """Retrieve signed distance field at surface points. This is always 0.0, but we still create a sample processor for it to be able to easily concatenate it with the surface normals.""" | ||
| return torch.zeros(self.getitem_surface_normals(idx).shape[0], 1) | ||
|
|
||
| def getitem_volume_normals(self, idx: int) -> torch.Tensor: |
There was a problem hiding this comment.
Ah, this explains. What are your thoughts on adding a default tensor to the dataset? Why not make it part of the pipeline as it is now?
There was a problem hiding this comment.
it's so that we don't need the data statistics in the pipeline and keep them in the Dataset/normalizers
Reorganize tutorial/ into recipes/: Moved the tutorial directory into two focused recipe packages — recipes/aero_cfd/ (config-driven, Hydra/YAML) and recipes/aero_cfd_python/ (pure-Python, preset-based) — and deleted the old tutorial/ directory
Introduce
FieldNormalizerConfig: Replaced hardcoded normalizer statistics in presets with a declarative FieldNormalizerConfig that resolves statistics from the dataset, defaulting to using the STATS_FILE, simplifying preset code and eliminating duplicated stat values between YAML configs and PythonRemove noether.core.schemas.aero subpackage: Moved the domain-specific schema classes (AeroDatasetConfig, AeroCFDPipelineConfig, SurfaceVolumeEvaluationMetricsCallbackConfig) to the recipe
Moved the tutorial to the docs: RST-based tutorial walkthrough covering configuration, datasets, pipeline, models, callbacks, and running experiments, eliminating duplication between the aero_cfd recipe and the docs by directly including the files
Minor fixes: AeroABUPT.forward() now unpacks the tuple return from AnchoredBranchedUPT, added surface_sdf getter to AeroDataset, dataset normalizer configs with default kind values