Convert config.pkl to config.yml
Closed this issue · 3 comments
Starting in cryodrgn version 2.x, we should save the config.pkl
as a config.yml
file so that the configuration file is human readable. We can then deprecate the cryodrgn_utils view_config
command.
We probably want to support reading from both config.pkl
and config.yml
files so we maintain backwards compatibility.
So I suppose this is what it's going to look like (I took a sample config from a train_vae
run on EMPIAR 10076):
dataset_args:
ctf: /home/vineetb/cryodrgn/cryodrgn_empiar/empiar10076/inputs/ctf.pkl
datadir: null
do_pose_sgd: false
ind: null
invert_data: false
keepreal: false
norm:
- 0
- 278.5937805175781
particles: /media/vineetb/t5/10076_128/particles.128.txt
poses: /home/vineetb/cryodrgn/cryodrgn_empiar/empiar10076/inputs/poses.pkl
window: true
window_r: 0.85
lattice_args:
D: 129
extent: 0.5
ignore_DC: true
model_args:
activation: relu
domain: fourier
enc_mask: 64
encode_mode: resid
feat_sigma: 0.5
pdim: 1024
pe_dim: null
pe_type: gaussian
players: 3
qdim: 1024
qlayers: 3
zdim: 8
seed: 12345
Should we throw a DeprecationWarning
when reading a config if it is in the .pkl
format? That'll give us some runway for removing it in a future release.
Do .yml
files handle None
and tuples (for dataset_args.norm
) gracefully? Otherwise, looks good to me, and agree, the DeprecationWarning
is a good idea!
Yes - seems to work correctly (write + read back) in both cases.
Tuple:
norm:
- 0
- 278.5937805175781
None:
pe_dim: null