Skip to content

Commit

Permalink
test set_params
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlincr committed Aug 11, 2023
1 parent b327689 commit 45e833e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,15 @@ def test_get_params():
params = model.get_params()
assert len(params) != 0
assert type(params) is dict
assert '_embedding' not in params
assert '_embedding' not in params

def test_set_params():
model = DeepWalk()
default_params = model.get_params()
params = {'dimensions': 1,
'seed': 123}
model.set_params(**params)
new_params = model.get_params()
assert new_params != default_params
assert new_params['dimensions'] == 1
assert new_params['seed'] == 123

0 comments on commit 45e833e

Please sign in to comment.