save config files update

This commit is contained in:
2023-01-28 12:24:17 +00:00
parent c7e75acc2d
commit 1beda23ce2
+4 -2
View File
@@ -45,7 +45,7 @@ from models.cvae_model import CVAENew as CVAE
def init_wandb(): def init_wandb():
run = wandb.init(project='ablation', name=config['name'], notes=config['notes'], dir='/wandb') run = wandb.init(project='ablation', name=config['name'], notes=config['notes'], dir='/wandb', tags=config['tags'])
artifact = wandb.Artifact('code', type='code') artifact = wandb.Artifact('code', type='code')
artifact.add_file('cvae.py') artifact.add_file('cvae.py')
artifact.add_file('models/cvae_model.py') artifact.add_file('models/cvae_model.py')
@@ -58,7 +58,9 @@ def init_wandb():
artifact.add_file('convnext/models/convnext_tf.py') artifact.add_file('convnext/models/convnext_tf.py')
config_file_names = [key for key in sys.modules.keys() if key.startswith('configs.')] config_file_names = [key for key in sys.modules.keys() if key.startswith('configs.')]
for config_file_name in config_file_names: for config_file_name in config_file_names:
artifact.add_file('/'.join(config_file_name.split('.')) + '.py') file_name = '/'.join(config_file_name.split('.')) + '.py'
if os.path.exists(file_name):
artifact.add_file(file_name)
run.log_artifact(artifact) run.log_artifact(artifact)
uv2mesh = UV2Mesh(res=256, is_skirt=config['is_skirt'], is_adaptive=False, is_smpl_orig=config['is_cape']) uv2mesh = UV2Mesh(res=256, is_skirt=config['is_skirt'], is_adaptive=False, is_smpl_orig=config['is_cape'])