Skip to content

Commit

Permalink
Altered pytest to match updated network metrics functions; removed a …
Browse files Browse the repository at this point in the history
…couple of unnecessary imports
  • Loading branch information
Victoria authored and Victoria committed Sep 3, 2024
1 parent 390a62d commit f75280b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion dgl_ptm/dgl_ptm/agent/agent_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from dgl_ptm.agent.wealth_consumption import wealth_consumption
from dgl_ptm.agent.capital_update import capital_update
from dgl_ptm.util.network_metrics import node_degree, node_weighted_degree
import torch


def agent_update(model_graph, model_params=None, device=None, timestep=None, method='pseudo'):
Expand Down
2 changes: 0 additions & 2 deletions dgl_ptm/dgl_ptm/model/step.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
from dgl_ptm.network.local_attachment import local_attachment
from dgl_ptm.network.local_attachment_basic_homophily import local_attachment_homophily
from dgl_ptm.network.random_edge_noise import random_edge_noise
from dgl_ptm.util.network_metrics import average_degree, average_weighted_degree


def ptm_step(agent_graph, device, timestep, params):
"""Step - time-stepping module for the poverty-trap model.
Expand Down
2 changes: 1 addition & 1 deletion dgl_ptm/tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def model():

class TestNetworkMetrics:
def test_average_degree_initialize(self, model):
expected_ad = 1.98
expected_ad = 3.96
assert model.average_degree == expected_ad

def test_average_degree_step(self, model):
Expand Down

0 comments on commit f75280b

Please sign in to comment.