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

Validation Structures of None results in termination for PotentialTrainer #73

Open
danielsauceda opened this issue May 2, 2023 · 0 comments

Comments

@danielsauceda
Copy link

It seems when doing

trainer = PotentialTrainer(
    potential=potential, optimizer=tf.keras.optimizers.Adam(1e-3)
)

That if no Validation sets are provided. then the entire endeavor fails. This would be because of difference in the Trainer class which has the following condition

          if has_validation:
                val_predictions = []
                val_targets = []
                for val_index, batch in enumerate(mgb_val):
                    graph_batch, target_batch = batch
                    if isinstance(graph_batch, MaterialGraph):

Whereas PotentialTrainer does not and attempts do.

            for batch_index, batch in enumerate(mgb_val):
                graph_batch, target_batch = batch

and since "mgb_val" is not set it fails since the "has_validation" condition is not utilized

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

No branches or pull requests

1 participant