Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert config.pkl to config.yml #235

Closed
zhonge opened this issue Mar 1, 2023 · 3 comments
Closed

Convert config.pkl to config.yml #235

zhonge opened this issue Mar 1, 2023 · 3 comments
Assignees

Comments

@zhonge
Copy link
Collaborator

zhonge commented Mar 1, 2023

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.

@zhonge zhonge assigned zhonge and vineetbansal and unassigned zhonge Mar 2, 2023
@vineetbansal
Copy link
Collaborator

vineetbansal commented Mar 3, 2023

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.

@zhonge
Copy link
Collaborator Author

zhonge commented Mar 8, 2023

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!

@vineetbansal
Copy link
Collaborator

Yes - seems to work correctly (write + read back) in both cases.

Tuple:

  norm:
  - 0
  - 278.5937805175781

None:

pe_dim: null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants