stanfordnlp / pyvene

Stanford NLP Python Library for Understanding and Improving PyTorch Models via Interventions
http://pyvene.ai
Apache License 2.0
559 stars 50 forks source link

[Major] Update API namings and parameters #78

Closed frankaging closed 6 months ago

frankaging commented 6 months ago

Testing Done:

WARNING:root:Saving trainable intervention to intkey_layer.0.repr.block_output.unit.pos.nunit.1#0.bin.
WARNING:root:Saving trainable intervention to intkey_layer.1.repr.block_output.unit.pos.nunit.1#0.bin.
WARNING:root:The key is provided in the config. Assuming this is loaded from a pretrained module.
WARNING:root:Loading trainable intervention from intkey_layer.0.repr.block_output.unit.pos.nunit.1#0.bin.
WARNING:root:Loading trainable intervention from intkey_layer.1.repr.block_output.unit.pos.nunit.1#0.bin.
.Directory './test_output_dir_prefix-2a2df9' created successfully.
.Directory './test_output_dir_prefix-1481de' created successfully.
WARNING:root:Saving trainable intervention to intkey_layer.0.repr.block_output.unit.pos.nunit.1#0.bin.
WARNING:root:Saving trainable intervention to intkey_layer.1.repr.block_output.unit.pos.nunit.1#0.bin.
.Removing testing dir ./test_output_dir_prefix-2759d7
Removing testing dir ./test_output_dir_prefix-957b2e
Removing testing dir ./test_output_dir_prefix-409253
Removing testing dir ./test_output_dir_prefix-2a2df9
Removing testing dir ./test_output_dir_prefix-1481de

----------------------------------------------------------------------
Ran 31 tests in 5.177s

OK
frankaging commented 6 months ago

More Testing Done:

Directory './test_output_dir_prefix-31b890' created successfully.
WARNING:root:Saving trainable intervention to intkey_layer.0.repr.block_output.unit.pos.nunit.1#0.bin.
WARNING:root:Saving trainable intervention to intkey_layer.1.repr.block_output.unit.pos.nunit.1#0.bin.
WARNING:root:The key is provided in the config. Assuming this is loaded from a pretrained module.
WARNING:root:Loading trainable intervention from intkey_layer.0.repr.block_output.unit.pos.nunit.1#0.bin.
WARNING:root:Loading trainable intervention from intkey_layer.1.repr.block_output.unit.pos.nunit.1#0.bin.
.Directory './test_output_dir_prefix-9c79ad' created successfully.
.Directory './test_output_dir_prefix-5595ff' created successfully.
WARNING:root:Saving trainable intervention to intkey_layer.0.repr.block_output.unit.pos.nunit.1#0.bin.
WARNING:root:Saving trainable intervention to intkey_layer.1.repr.block_output.unit.pos.nunit.1#0.bin.
.Removing testing dir ./test_output_dir_prefix-09bf4e
Removing testing dir ./test_output_dir_prefix-4cb070
Removing testing dir ./test_output_dir_prefix-31b890
Removing testing dir ./test_output_dir_prefix-9c79ad
Removing testing dir ./test_output_dir_prefix-5595ff

----------------------------------------------------------------------
Ran 43 tests in 29.018s

OK

All tutorials are passing. I am adding more tests.

frankaging commented 6 months ago

More Testing Done:


Ran 48 tests in 36.717s

OK

frankaging commented 6 months ago

Testing Done:

Directory './test_output_dir_prefix-6e2da3' created successfully.
WARNING:root:Saving trainable intervention to intkey_layer.0.repr.block_output.unit.pos.nunit.1#0.bin.
WARNING:root:Saving trainable intervention to intkey_layer.1.repr.block_output.unit.pos.nunit.1#0.bin.
WARNING:root:The key is provided in the config. Assuming this is loaded from a pretrained module.
WARNING:root:Loading trainable intervention from intkey_layer.0.repr.block_output.unit.pos.nunit.1#0.bin.
WARNING:root:Loading trainable intervention from intkey_layer.1.repr.block_output.unit.pos.nunit.1#0.bin.
.Directory './test_output_dir_prefix-6a3b71' created successfully.
.Directory './test_output_dir_prefix-a73d51' created successfully.
WARNING:root:Saving trainable intervention to intkey_layer.0.repr.block_output.unit.pos.nunit.1#0.bin.
WARNING:root:Saving trainable intervention to intkey_layer.1.repr.block_output.unit.pos.nunit.1#0.bin.
.Removing testing dir ./test_output_dir_prefix-c87663
Removing testing dir ./test_output_dir_prefix-5b6972
Removing testing dir ./test_output_dir_prefix-6e2da3
Removing testing dir ./test_output_dir_prefix-6a3b71
Removing testing dir ./test_output_dir_prefix-a73d51

----------------------------------------------------------------------
Ran 51 tests in 41.240s

OK