Skip to content

Commit a151c29

Browse files
authored
add randomness_seed to upload and download (#416)
1 parent 66c6fd2 commit a151c29

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

cellpack/autopack/DBRecipeHandler.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,8 @@ def compile_db_recipe_data(db_recipe_data, obj_dict, grad_dict, comp_dict):
853853
}
854854
if db_recipe_data.get("grid_file_path"):
855855
recipe_data["grid_file_path"] = db_recipe_data.get("grid_file_path")
856+
if db_recipe_data.get("randomness_seed"):
857+
recipe_data["randomness_seed"] = db_recipe_data.get("randomness_seed")
856858
if grad_dict:
857859
recipe_data["gradients"] = [
858860
{**v} for v in DBRecipeLoader.remove_dedup_hash(grad_dict).values()

cellpack/bin/upload.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ def get_recipe_metadata(loader):
2323
}
2424
if "grid_file_path" in loader.recipe_data:
2525
recipe_meta_data["grid_file_path"] = loader.recipe_data["grid_file_path"]
26+
if "randomness_seed" in loader.recipe_data:
27+
recipe_meta_data["randomness_seed"] = loader.recipe_data["randomness_seed"]
2628
return recipe_meta_data
2729
except KeyError as e:
2830
sys.exit(f"Recipe metadata is missing. {e}")

0 commit comments

Comments
 (0)