geoelements / gns

Graph Network Simulator
https://www.geoelements.org/gns/
Other
124 stars 30 forks source link

Functionality testing #40

Closed WPettersson closed 1 year ago

WPettersson commented 1 year ago

Describe the feature The few tests included do little more than test if the imports cause Python to error. Testing really should include results are accurate.

Describe alternatives Include more tests that check whether the code accurately calculates what it claims to calculate.

kks32 commented 1 year ago

Thanks @WPettersson, we do have a test in CircleCI that tests if the GNS can train and predict after 10 steps of training data. python -m gns.train --data_path=${DATA_PATH} --model_path=${MODEL_PATH} --ntraining_steps=10 --mode='train'. Unfortunately, due to limitations of free CI services. I'm limited to 2 CPU nodes. The GNS code is built to train on GPUs and for 2 million steps to generate meaningful prediction of trajectories. The GNS training on GPU is currently not possible on a free CI service. So, we show that the GNS works and trains for a simple problem with 10 steps.

kks32 commented 1 year ago

@WPettersson I have also added unit tests for all major classes used in the GNS code.

WPettersson commented 1 year ago

These tests look great, well done :)