Skip to content

Commit 4fe41b9

Browse files
coreyjadamsmnabiandreamtalenram-cherukuridakhare-creator
authored
Refactor (#1231)
* Move filesystems and version_check to core * Fix version check tests * Reorganize distributed, domain_parallel, and begin nn / utils cleanup. * Move modules and meta to core. Move registry to core. No tests fixed yet. * Add missing init files * Update build system and specify some deps. * Reorganize tests. * Update init files * Clean up neighbor tools. * Update testing * Fix compat tests * Move core model tests to tests/core/ * Add import lint config * Relocate layers * Move graphcast utils into model directory * Relocating util functionalities. * Further clean up and organize tests. * utils tests are passing now * Cleaning up distributed tests * Patching tests working again in nn * Fix sdf test * Fix zenith angle tests * Some organization of tests. Checkpoints is moved into utils. * Remove launch.utils and launch.config. Checkpointing is moved to phsyicsnemo.utils, launch.config is just gone. It was empty. * Most nn tests are passing * Further cleanup. Getting there! * Remove constants file * Add import linting to pre-commit. * Update crash readme (#1212) * update license headers- second try * update readme * Bump multi-storage-client to v0.33.0 with rust client (#1156) * Move gnn layers and start to fix several model tests. * AFNO is now passing. * Rnn models passing. * Fix improt * Healpix tests are working * Domino and unet working * Add jaxtyping to requirements.txt for crash sample (#1218) * update license headers- second try * Update requirements.txt * Updating to address some test issues * Replace 'License' link with 'Dev blog' link (#1215) Co-authored-by: Corey adams <[email protected]> * MGN tests passing again * Most graphcast tests passing again * Move nd conv layers. * update fengwu and pangu * Update sfno and pix2pix test * update tests for figconvnet, swinrnn, superresnet * updating more models to pass * Update distributed tests, now passing. * Validation fu added to examples/structural_mechanics/crash/train.py (#1204) * validation added: works for multi-node job. * rename and rearrange validation function * validate_every_n_epochs, save_ckpt_every_n_epochs added in config * corrected bug (args of model) in inference * args in validation code updated * val path added and args name changed * validation split added -> write_vtp=False * fixed inference bug * bug fix: write_vtp * Domain parallel tests now passing. * Fix active learning imports so tests pass in refactor * Fix some metric imports * Remove deploy package * Remove unused test file * unmigrate these files ... again? * Update import linter. * Add saikrishnanc-nv to github actors (#1225) * Integrate Curator instructions to the Crash example (#1213) * Integrate Curator instructions * Update docs * Formatting changes * Adding code of conduct (#1214) * Adding code of conduct Adopting the code of conduct from the https://www.contributor-covenant.org/ * Update CODE_OF_CONDUCT.MD Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Create .markdownlintignore * Revise README for PhysicsNeMo resources and guidance Updated the 'Getting Started' section and added new resources for learning AI Physics. * Update README.md --------- Co-authored-by: Mohammad Amin Nabian <[email protected]> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Co-authored-by: Corey adams <[email protected]> * Cleaning up diffusion models. Not quite done yet. * Restore deleted files * Updating more tests. * Further updates to tests. Datapipes almost working. --------- Co-authored-by: Mohammad Amin Nabian <[email protected]> Co-authored-by: Yongming Ding <[email protected]> Co-authored-by: ram-cherukuri <[email protected]> Co-authored-by: Deepak Akhare <[email protected]> Co-authored-by: Sai Krishnan Chandrasekar <[email protected]> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
1 parent b9aa3dd commit 4fe41b9

File tree

108 files changed

+1058
-397
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1058
-397
lines changed

.github/workflows/blossom-ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ jobs:
6262
github.actor == 'peterdsharpe' ||
6363
github.actor == 'coreyjadams' ||
6464
github.actor == 'CharlelieLrt' ||
65-
github.actor == 'abokov-nv'
65+
github.actor == 'abokov-nv' ||
66+
github.actor == 'saikrishnanc-nv'
6667
)
6768
steps:
6869
- name: Check if comment is issued by authorized person

.importlinter

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ containers=
99
physicsnemo
1010
layers =
1111
experimental
12-
diffusion | active_learning
12+
active_learning
1313
models : registry : datapipes : metrics : domain_parallel
1414
nn
1515
utils
@@ -63,14 +63,6 @@ layers =
6363
neighbors
6464
utils
6565

66-
[importlinter:contract:physicsnemo-diffusion]
67-
name = Control Dependencies in PhysicsNeMo diffusion
68-
type = layers
69-
containers=
70-
physicsnemo.diffusion
71-
layers =
72-
patching
73-
7466
[importlinter:contract:physicsnemo-models]
7567
name = Prevent Imports between physicsnemo models
7668
type = layers

.markdownlintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CODE_OF_CONDUCT.md

CODE_OF_CONDUCT.MD

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
2+
# Contributor Covenant 3.0 Code of Conduct
3+
4+
## Our Pledge
5+
6+
We pledge to make our community welcoming, safe, and equitable for all.
7+
8+
We are committed to fostering an environment that respects and promotes the dignity, rights, and contributions of all individuals, regardless of characteristics including race, ethnicity, caste, color, age, physical characteristics, neurodiversity, disability, sex or gender, gender identity or expression, sexual orientation, language, philosophy or religion, national or social origin, socio-economic position, level of education, or other status. The same privileges of participation are extended to everyone who participates in good faith and in accordance with this Covenant.
9+
10+
## Encouraged Behaviors
11+
12+
While acknowledging differences in social norms, we all strive to meet our community's expectations for positive behavior. We also understand that our words and actions may be interpreted differently than we intend based on culture, background, or native language.
13+
14+
With these considerations in mind, we agree to behave mindfully toward each other and act in ways that center our shared values, including:
15+
16+
1. Respecting the **purpose of our community**, our activities, and our ways of gathering.
17+
2. Engaging **kindly and honestly** with others.
18+
3. Respecting **different viewpoints** and experiences.
19+
4. **Taking responsibility** for our actions and contributions.
20+
5. Gracefully giving and accepting **constructive feedback**.
21+
6. Committing to **repairing harm** when it occurs.
22+
7. Behaving in other ways that promote and sustain the **well-being of our community**.
23+
24+
25+
## Restricted Behaviors
26+
27+
We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are violations of this Code of Conduct.
28+
29+
1. **Harassment.** Violating explicitly expressed boundaries or engaging in unnecessary personal attention after any clear request to stop.
30+
2. **Character attacks.** Making insulting, demeaning, or pejorative comments directed at a community member or group of people.
31+
3. **Stereotyping or discrimination.** Characterizing anyone’s personality or behavior on the basis of immutable identities or traits.
32+
4. **Sexualization.** Behaving in a way that would generally be considered inappropriately intimate in the context or purpose of the community.
33+
5. **Violating confidentiality**. Sharing or acting on someone's personal or private information without their permission.
34+
6. **Endangerment.** Causing, encouraging, or threatening violence or other harm toward any person or group.
35+
7. Behaving in other ways that **threaten the well-being** of our community.
36+
37+
### Other Restrictions
38+
39+
1. **Misleading identity.** Impersonating someone else for any reason, or pretending to be someone else to evade enforcement actions.
40+
2. **Failing to credit sources.** Not properly crediting the sources of content you contribute.
41+
3. **Promotional materials**. Sharing marketing or other commercial content in a way that is outside the norms of the community.
42+
4. **Irresponsible communication.** Failing to responsibly present content which includes, links or describes any other restricted behaviors.
43+
44+
45+
## Reporting an Issue
46+
47+
Tensions can occur between community members even when they are trying their best to collaborate. Not every conflict represents a code of conduct violation, and this Code of Conduct reinforces encouraged behaviors and norms that can help avoid conflicts and minimize harm.
48+
49+
When an incident does occur, it is important to report it promptly. To report a possible violation, **please contact [email protected]**
50+
51+
Community Moderators take reports of violations seriously and will make every effort to respond in a timely manner. They will investigate all reports of code of conduct violations, reviewing messages, logs, and recordings, or interviewing witnesses and other participants. Community Moderators will keep investigation and enforcement actions as transparent as possible while prioritizing safety and confidentiality. In order to honor these values, enforcement actions are carried out in private with the involved parties, but communicating to the whole community may be part of a mutually agreed upon resolution.
52+
53+
54+
## Addressing and Repairing Harm
55+
56+
****
57+
58+
If an investigation by the Community Moderators finds that this Code of Conduct has been violated, the following enforcement ladder may be used to determine how best to repair harm, based on the incident's impact on the individuals involved and the community as a whole. Depending on the severity of a violation, lower rungs on the ladder may be skipped.
59+
60+
1) Warning
61+
1) Event: A violation involving a single incident or series of incidents.
62+
2) Consequence: A private, written warning from the Community Moderators.
63+
3) Repair: Examples of repair include a private written apology, acknowledgement of responsibility, and seeking clarification on expectations.
64+
2) Temporarily Limited Activities
65+
1) Event: A repeated incidence of a violation that previously resulted in a warning, or the first incidence of a more serious violation.
66+
2) Consequence: A private, written warning with a time-limited cooldown period designed to underscore the seriousness of the situation and give the community members involved time to process the incident. The cooldown period may be limited to particular communication channels or interactions with particular community members.
67+
3) Repair: Examples of repair may include making an apology, using the cooldown period to reflect on actions and impact, and being thoughtful about re-entering community spaces after the period is over.
68+
3) Temporary Suspension
69+
1) Event: A pattern of repeated violation which the Community Moderators have tried to address with warnings, or a single serious violation.
70+
2) Consequence: A private written warning with conditions for return from suspension. In general, temporary suspensions give the person being suspended time to reflect upon their behavior and possible corrective actions.
71+
3) Repair: Examples of repair include respecting the spirit of the suspension, meeting the specified conditions for return, and being thoughtful about how to reintegrate with the community when the suspension is lifted.
72+
4) Permanent Ban
73+
1) Event: A pattern of repeated code of conduct violations that other steps on the ladder have failed to resolve, or a violation so serious that the Community Moderators determine there is no way to keep the community safe with this person as a member.
74+
2) Consequence: Access to all community spaces, tools, and communication channels is removed. In general, permanent bans should be rarely used, should have strong reasoning behind them, and should only be resorted to if working through other remedies has failed to change the behavior.
75+
3) Repair: There is no possible repair in cases of this severity.
76+
77+
This enforcement ladder is intended as a guideline. It does not limit the ability of Community Managers to use their discretion and judgment, in keeping with the best interests of our community.
78+
79+
80+
## Scope
81+
82+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public or other spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
83+
84+
85+
## Attribution
86+
87+
This Code of Conduct is adapted from the Contributor Covenant, version 3.0, permanently available at [https://www.contributor-covenant.org/version/3/0/](https://www.contributor-covenant.org/version/3/0/).
88+
89+
Contributor Covenant is stewarded by the Organization for Ethical Source and licensed under CC BY-SA 4.0. To view a copy of this license, visit [https://creativecommons.org/licenses/by-sa/4.0/](https://creativecommons.org/licenses/by-sa/4.0/)
90+
91+
For answers to common questions about Contributor Covenant, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are provided at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). Additional enforcement and community guideline resources can be found at [https://www.contributor-covenant.org/resources](https://www.contributor-covenant.org/resources). The enforcement ladder was inspired by the work of [Mozilla’s code of conduct team](https://github.com/mozilla/inclusion).
92+

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
[**NVIDIA PhysicsNeMo**](#what-is-physicsnemo)
1212
| [**Documentation**](https://docs.nvidia.com/deeplearning/physicsnemo/physicsnemo-core/index.html)
1313
| [**Install Guide**](#installation)
14-
| [**Getting Started**](#getting-started)
14+
| [**Getting Started**](#getting-started-with-physicsnemo)
1515
| [**Contributing Guidelines**](#contributing-to-physicsnemo)
16-
| [**License**](#license)
16+
| [**Dev blog**](https://nvidia.github.io/physicsnemo/blog/)
1717

1818
## What is PhysicsNeMo?
1919

@@ -46,7 +46,7 @@ provides you with an optimized stack that will enable you to train your models a
4646
- [Domain-Specific Packages](#domain-specific-packages)
4747
- [Who is Using and Contributing to PhysicsNeMo](#who-is-using-and-contributing-to-physicsnemo)
4848
- [Why Use PhysicsNeMo](#why-are-they-using-physicsnemo)
49-
- [Getting Started](#getting-started)
49+
- [Getting Started](#getting-started-with-physicsnemo)
5050
- [Resources](#resources)
5151
- [Installation](#installation)
5252
- [Contributing](#contributing-to-physicsnemo)
@@ -302,7 +302,7 @@ Here are some of the key benefits of PhysicsNeMo for SciML model development:
302302

303303
See what your peer SciML researchers are saying about PhysicsNeMo (coming soon).
304304

305-
## Getting Started
305+
## Getting Started with PhysicsNeMo
306306

307307
The following resources will help you learn how to use PhysicsNeMo. The best
308308
way is to start with a reference sample and then update it for your own use case.
@@ -313,16 +313,21 @@ way is to start with a reference sample and then update it for your own use case
313313
- [Reference Samples](https://github.com/NVIDIA/physicsnemo/blob/main/examples/README.md)
314314
- [User Guide Documentation](https://docs.nvidia.com/deeplearning/physicsnemo/physicsnemo-core/index.html)
315315

316+
## Learning AI Physics
317+
318+
- [Explore Jupyter Notebooks on Hugging Face](https://huggingface.co/collections/nvidia/physicsnemo)
319+
- [AI4Science PhysicsNeMo Bootcamp](https://github.com/openhackathons-org/End-to-End-AI-for-Science)
320+
- [Self-Paced DLI Training](https://learn.nvidia.com/courses/course-detail?course_id=course-v1:DLI+S-OV-04+V1)
321+
- [Deep Learning for Science and Engineering Lecture Series](https://www.nvidia.com/en-us/on-demand/deep-learning-for-science-and-engineering/)
322+
- [Video Tutorials](https://www.nvidia.com/en-us/on-demand/search/?facet.mimetype[]=event%20session&layout=list&page=1&q=physicsnemo&sort=relevance&sortDir=desc)
323+
316324
## Resources
317325

318326
- [Getting Started Webinar](https://www.nvidia.com/en-us/on-demand/session/gtc24-dlit61460/?playlistId=playList-bd07f4dc-1397-4783-a959-65cec79aa985)
327+
- [PhysicsNeMo: Purpose and Usage](https://www.nvidia.com/en-us/on-demand/session/dliteachingkit-setk5002/)
319328
- [AI4Science PhysicsNeMo Bootcamp](https://github.com/openhackathons-org/End-to-End-AI-for-Science)
320329
- [PhysicsNeMo Pretrained Models](https://catalog.ngc.nvidia.com/models?filters=&orderBy=scoreDESC&query=PhysicsNeMo&page=&pageSize=)
321330
- [PhysicsNeMo Datasets and Supplementary Materials](https://catalog.ngc.nvidia.com/resources?filters=&orderBy=scoreDESC&query=PhysicsNeMo&page=&pageSize=)
322-
- [Self-Paced PhysicsNeMo DLI Training](https://learn.nvidia.com/courses/course-detail?course_id=course-v1:DLI+S-OV-04+V1)
323-
- [Deep Learning for Science and Engineering Lecture Series with PhysicsNeMo](https://www.nvidia.com/en-us/on-demand/deep-learning-for-science-and-engineering/)
324-
- [PhysicsNeMo: Purpose and Usage](https://www.nvidia.com/en-us/on-demand/session/dliteachingkit-setk5002/)
325-
- [Video Tutorials](https://www.nvidia.com/en-us/on-demand/search/?facet.mimetype[]=event%20session&layout=list&page=1&q=physicsnemo&sort=relevance&sortDir=desc)
326331

327332
## Installation
328333

test/models/diffusion/test_diffusion_fwi_net.py renamed to examples/geophysics/diffusion_fwi/tests/test_diffusion_fwi_net.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@
2222
import torch
2323

2424
import physicsnemo
25-
26-
script_path: str = os.path.abspath(__file__)
27-
sys.path.append(os.path.join(os.path.dirname(script_path), ".."))
28-
29-
import common # noqa: E402
25+
from test import common # noqa: E402
3026

3127

3228
def _create_diffusion_fwi_net(arch_type: str = "fwi_small", **kwargs):
@@ -200,7 +196,7 @@ def test_diffusion_fwi_net_non_regression_from_checkpoint(device, arch_type):
200196
/ Path(f"checkpoint_diffusion_fwi_net_{run_id}-v1.2.0.mdlus")
201197
)
202198

203-
model: physicsnemo.Module = physicsnemo.Module.from_checkpoint(
199+
model: physicsnemo.core.Module = physicsnemo.core.Module.from_checkpoint(
204200
file_name=file_name,
205201
).to(device)
206202

0 commit comments

Comments
 (0)