Migrating to newer versions¶
Migrating from v0 to v1¶
Networks are modeled differently in v1, so the contents of the local ./networks/ folder should be scrapped.
To convert a v0 Results file to a v1 Results file, use bcn.v0.migrate_results. Likewise, use bcn.v0.migrate_weights to convert a v0 weights file to a v1 weights file.
v1 comes with a compatbility submodule accessible via
>>> import bcn.v0
Below are the members of this submodule.
-
bcn.v0.Results¶ A v0 copy of the
bcn.Resultsclass.
-
bcn.v0.migrate_results(file, new_filename=None)¶ Migrate a results file that was generated from v0.4.98 or earlier to a v1 results file.
This overwrites the file unless the
new_filenameparameter is used.Example usage:
>>> from pathlib import Path >>> from bcn.v0 import migrate_results >>> for file in Path("./results/").iterdir(): ... migrate_results(file) ...
-
bcn.v0.migrate_weights(file, new_filename=None)¶ Migrate a weights file that was generated from v0.4.98 or earlier to a v1 weights file.
This overwrites the file unless the
new_filenameparameter is used.Example usage:
>>> from pathlib import Path >>> from bcn.v0 import migrate_weights >>> for file in Path("./results/").iterdir(): ... migrate_weights(file) ...