Skip to content

Commit 71a4a85

Browse files
committed
Merge conflict
1 parent 4c027c6 commit 71a4a85

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/lab/experiment.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ def update_config_field(self, key, value):
4545
except json.JSONDecodeError:
4646
current_config = {}
4747
current_config[key] = value
48-
self._update_json_data_field("config", json.dumps(current_config))
49-
48+
self._update_json_data_field("config", current_config)
49+
5050
@classmethod
51-
def create_with_config(cls, name: str, config: dict) -> 'Experiment':
51+
def create_with_config(cls, name: str, config: dict) -> "Experiment":
5252
"""Create an experiment with config."""
5353
# Convert string to dict if it's valid JSON, otherwise raise TypeError
5454
if isinstance(config, str):
@@ -59,7 +59,7 @@ def create_with_config(cls, name: str, config: dict) -> 'Experiment':
5959
elif not isinstance(config, dict):
6060
raise TypeError("config must be a dict")
6161
exp = cls.create(name)
62-
exp._update_json_data_field("config", json.dumps(config))
62+
exp._update_json_data_field("config", config)
6363
return exp
6464

6565
def update_config(self, config: dict):
@@ -72,7 +72,7 @@ def update_config(self, config: dict):
7272
except json.JSONDecodeError:
7373
current_config = {}
7474
current_config.update(config)
75-
self._update_json_data_field("config", json.dumps(current_config))
75+
self._update_json_data_field("config", current_config)
7676

7777
@classmethod
7878
def get_all(cls):
@@ -249,7 +249,7 @@ def _add_job(self, job_id, type):
249249
jobs[type].append(job_id)
250250
else:
251251
jobs[type] = [job_id]
252-
252+
253253
# TODO: For experiments, delete the same way as jobs
254254
def delete(self):
255255
"""Delete the experiment and all associated jobs."""
@@ -268,4 +268,4 @@ def delete_all_jobs(self):
268268
job = Job.get(job_id)
269269
job.delete()
270270
except Exception:
271-
pass # Job might not exist
271+
pass # Job might not exist

0 commit comments

Comments
 (0)