x-evolution 0.1.19__py3-none-any.whl → 0.1.23__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -112,6 +112,8 @@ class EvoStrategy(Module):
112
112
  self.print('pre_main_callback detected on environment passed in and is invoked')
113
113
  environment.pre_main_callback()
114
114
 
115
+ accelerator.wait_for_everyone()
116
+
115
117
  # take care of model and parameters
116
118
 
117
119
  if isinstance(model, list):
@@ -120,6 +122,15 @@ class EvoStrategy(Module):
120
122
  self.model = model
121
123
  self.noisable_model = Noisable(model, low_rank = noise_low_rank)
122
124
 
125
+ # use prepare and run through environment once to sync params
126
+
127
+ wrapped_model = accelerator.prepare(model)
128
+
129
+ with torch.no_grad():
130
+ environment(wrapped_model)
131
+
132
+ # get param dictionary
133
+
123
134
  named_parameters_dict = dict(model.named_parameters())
124
135
 
125
136
  param_to_name_index = {param: name for name, param in named_parameters_dict.items()}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: x-evolution
3
- Version: 0.1.19
3
+ Version: 0.1.23
4
4
  Summary: x-evolution
5
5
  Project-URL: Homepage, https://pypi.org/project/x-evolution/
6
6
  Project-URL: Repository, https://github.com/lucidrains/x-evolution
@@ -0,0 +1,6 @@
1
+ x_evolution/__init__.py,sha256=XcwXJgIMPnCWGfGws3-vKgoR_7IfVslJBtiMvmEeSg0,57
2
+ x_evolution/x_evolution.py,sha256=lvN3ePqD6a5dW1gOv0d1I9yQ4rdv6OuIVvKvXa0yRBM,19126
3
+ x_evolution-0.1.23.dist-info/METADATA,sha256=pYkzZj10t68WjpyFOSMzd8lhRYL9FNGRsHjlcLyP9zw,5728
4
+ x_evolution-0.1.23.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
5
+ x_evolution-0.1.23.dist-info/licenses/LICENSE,sha256=1yCiA9b5nhslTavxPjsQAO-wpOnwJR9-l8LTVi7GJuk,1066
6
+ x_evolution-0.1.23.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- x_evolution/__init__.py,sha256=XcwXJgIMPnCWGfGws3-vKgoR_7IfVslJBtiMvmEeSg0,57
2
- x_evolution/x_evolution.py,sha256=C70fX5PdLx1VLBXe1DYGBIOExucvLFbKDWiofBMrvQA,18860
3
- x_evolution-0.1.19.dist-info/METADATA,sha256=7xr4uJpkmkkg0bi9eByDktqRvm_IIcvHJcLAJUjB2QM,5728
4
- x_evolution-0.1.19.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
5
- x_evolution-0.1.19.dist-info/licenses/LICENSE,sha256=1yCiA9b5nhslTavxPjsQAO-wpOnwJR9-l8LTVi7GJuk,1066
6
- x_evolution-0.1.19.dist-info/RECORD,,