Skip to content

fix(thermoelastic2d): align column names with v1 dataset#247

Merged
mkeeler43 merged 1 commit into
mainfrom
fix/thermoelastic2d-v1-column-names
Apr 30, 2026
Merged

fix(thermoelastic2d): align column names with v1 dataset#247
mkeeler43 merged 1 commit into
mainfrom
fix/thermoelastic2d-v1-column-names

Conversation

@mkeeler43

Copy link
Copy Markdown
Contributor

Summary

  • Rename volfracvolume_fraction_target in Conditions dataclass and fea_model.py to match the v1 HuggingFace dataset column name
  • Rename volume_fractionvolume_fraction_error in objectives tuple and all fea_model.py return dicts to match the v1 dataset

Test plan

  • Verified conditions_keys all exist in thermoelastic_2d_v1 dataset columns
  • Verified objectives names all exist in thermoelastic_2d_v1 dataset columns
  • Ran simulate() successfully on a random design from the dataset
  • Ran optimize() successfully with max_iter=5

🤖 Generated with Claude Code

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Aligns thermoelastic2d v0 problem input/output field names with the v1 HuggingFace dataset schema, so dataset-driven configs and objective columns match simulator/optimizer expectations.

Changes:

  • Renamed condition key volfracvolume_fraction_target in ThermoElastic2D.Conditions and FeaModel.run() boundary-condition parsing.
  • Renamed objective/result key volume_fractionvolume_fraction_error across objectives and returned result dicts.
  • Updated the 2D FEA model’s example bcs to use the new key name.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
engibench/problems/thermoelastic2d/v0.py Updates objective name and condition field to match v1 dataset columns; updates simulate() to read the renamed result key.
engibench/problems/thermoelastic2d/model/fea_model.py Updates expected BC key and returned result dict key to match v1 dataset columns; updates local __main__ example.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread engibench/problems/thermoelastic2d/v0.py
Comment thread engibench/problems/thermoelastic2d/v0.py
Comment thread engibench/problems/thermoelastic2d/model/fea_model.py
Comment thread engibench/problems/thermoelastic2d/model/fea_model.py
Comment thread engibench/problems/thermoelastic2d/model/fea_model.py
Rename `volfrac` → `volume_fraction_target` in Conditions and fea_model,
and `volume_fraction` → `volume_fraction_error` in objectives and return dicts
to match the thermoelastic_2d_v1 HuggingFace dataset schema.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mkeeler43 mkeeler43 force-pushed the fix/thermoelastic2d-v1-column-names branch from 6383f3a to 4e1f1de Compare April 30, 2026 15:26
@mkeeler43 mkeeler43 merged commit 43e9cc7 into main Apr 30, 2026
15 checks passed
@mkeeler43 mkeeler43 deleted the fix/thermoelastic2d-v1-column-names branch April 30, 2026 20:10
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.

2 participants