Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config files refactor, Examples polish, Perturbation in GraphDefinition #603

Conversation

RasmusOrsoe
Copy link
Collaborator

A continuation of #591.

Closes #583 and #588

@AMHermansen
Copy link
Collaborator

AMHermansen commented Sep 22, 2023

Since I've also contributed to this PR maybe it would be better if @Aske-Rosted also had a look at it?

Copy link
Collaborator

@AMHermansen AMHermansen left a comment

Choose a reason for hiding this comment

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

I found a small typo in the README.md, but besides that it looks good.
I would like if someone who didn't work on this also had a look at the changes :) before merging this.

--model-config configs/models/example_direction_reconstruction_model.yml \
--prediction-names zenith_pred zenith_kappa_pred azimuth_pred azimuth_kappa_pred
```

**`02_train_model_without_configs.py`** Shows how to train a GNN on neutrino telescope data **without configuration files,** i.e., by programatically constructing the dataset and model used. This is good for debugging and experimenting with different dataset settings and model configurations, as it is easier to build the model using the API than by writing configuration files from scratch. For instance, try running:
**`02_train_model_dynedge_from_config.py** Shows how to train a GNN on neutrino telescope data **using configuration files** to construct the dataset that loads the data and the model that is trained. This is the recommended way to configure standard dataset and models, as it is easier to ready and share than doing so in pure code. This example can be run using a few different models targeting different physics use cases. For instance, you can try running:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you mean 03_...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks!

@RasmusOrsoe
Copy link
Collaborator Author

@Aske-Rosted Could you give this a look at some point? As @AMHermansen both him and I contributed to this, so a 3rd pair of eyes would be brilliant.

Copy link
Collaborator

Choose a reason for hiding this comment

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

if the Not version proof indicates that

model.save_state_dict()
model.save_config()

is more robust than
model.save()
and that this might fail due to a version conflict then I would consider changing the order of the calls

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for this. What the comment means is not that executing these lines might lead to an error, but that archiving your model as .pth file under one version of graphnet can give you problems if you try to load it in a different version of graphnet. I'll update the comment to reflect this better.

Copy link
Collaborator

@Aske-Rosted Aske-Rosted left a comment

Choose a reason for hiding this comment

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

I left one minor comment otherwise I, did not see anything that looked suspicious to me.

@RasmusOrsoe RasmusOrsoe merged commit 3e553bd into graphnet-team:main Sep 23, 2023
12 checks passed
RasmusOrsoe added a commit to RasmusOrsoe/graphnet that referenced this pull request Oct 25, 2023
…s_perturbed_dataset_refactor

Config files refactor, Examples polish, Perturbation in GraphDefinition
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.

Make sure examples reflect intended usage
3 participants