Commit 5c97ff5e authored by Colleen Beaumard's avatar Colleen Beaumard
Browse files

Adaptation of ruamel import

parent fc696b0c
import ruamel.yaml
import ruamel_yaml
import argparse
parser = argparse.ArgumentParser()
......@@ -25,7 +25,7 @@ log = "logs/half_resnet34_{}emo_{}batch_lr-{}_Test-IEMOCAP{}.log".format(nb_cate
## Modification of variables in YAML files
# model.yaml
yaml = ruamel.yaml.YAML()
yaml = ruamel_yaml.YAML()
with open("config/custom/model.yaml") as fp:
data = yaml.load(fp)
......@@ -37,8 +37,6 @@ with open("config/custom/model.yaml", 'w') as fp:
# training.yaml
yaml = ruamel.yaml.YAML()
with open("config/custom/training.yaml") as fp:
data = yaml.load(fp)
data['lr'] = lr
......@@ -50,8 +48,6 @@ with open("config/custom/training.yaml", 'w') as fp:
yaml.dump(data, fp)
# Iemocap.yaml
yaml = ruamel.yaml.YAML()
with open("config/custom/Iemocap.yaml") as fp:
data = yaml.load(fp)
data['batch_size'] = batch
......
import ruamel.yaml
import ruamel_yaml
import argparse
parser = argparse.ArgumentParser()
......@@ -26,7 +26,7 @@ log = "logs/half_resnet34_{}emo_{}batch_lr-{}_Test-IEMOCAP{}.log".format(nb_cate
## Modification of variables in YAML files
# model.yaml
yaml = ruamel.yaml.YAML()
yaml = ruamel_yaml.YAML()
with open("config/half_resnet34/model.yaml") as fp:
data = yaml.load(fp)
......@@ -38,8 +38,6 @@ with open("config/half_resnet34/model.yaml", 'w') as fp:
# training.yaml
yaml = ruamel.yaml.YAML()
with open("config/half_resnet34/training.yaml") as fp:
data = yaml.load(fp)
data['lr'] = lr
......@@ -51,8 +49,6 @@ with open("config/half_resnet34/training.yaml", 'w') as fp:
yaml.dump(data, fp)
# Iemocap.yaml
yaml = ruamel.yaml.YAML()
with open("config/half_resnet34/Iemocap.yaml") as fp:
data = yaml.load(fp)
data['batch_size'] = batch
......
import ruamel.yaml
import ruamel_yaml
import argparse
parser = argparse.ArgumentParser()
......@@ -25,7 +25,7 @@ log = "logs/half_resnet34_{}emo_{}batch_lr-{}_Test-IEMOCAP{}.log".format(nb_cate
## Modification of variables in YAML files
# model.yaml
yaml = ruamel.yaml.YAML()
yaml = ruamel_yaml.YAML()
with open("config/wavlm_ecapa_circle/model.yaml") as fp:
data = yaml.load(fp)
......@@ -37,8 +37,6 @@ with open("config/wavlm_ecapa_circle/model.yaml", 'w') as fp:
# training.yaml
yaml = ruamel.yaml.YAML()
with open("config/wavlm_ecapa_circle/training.yaml") as fp:
data = yaml.load(fp)
data['lr'] = lr
......@@ -50,8 +48,6 @@ with open("config/wavlm_ecapa_circle/training.yaml", 'w') as fp:
yaml.dump(data, fp)
# Iemocap.yaml
yaml = ruamel.yaml.YAML()
with open("config/wavlm_ecapa_circle/Iemocap.yaml") as fp:
data = yaml.load(fp)
data['batch_size'] = batch
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment