mirror of
https://github.com/clearml/clearml-server
synced 2025-06-26 23:15:47 +00:00
Add Artifacts support, changed tags to system_tags and added user tags
Add hyper parameter sorting Add min/max value for all time series metrics
This commit is contained in:
18
migration/mongodb/0.12.1.py
Normal file
18
migration/mongodb/0.12.1.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from pymongo.database import Database, Collection
|
||||
|
||||
from database.utils import partition_tags
|
||||
|
||||
|
||||
def migrate_backend(db: Database):
|
||||
for name in ("project", "task", "model"):
|
||||
collection: Collection = db[name]
|
||||
for doc in collection.find(projection=["tags", "system_tags"]):
|
||||
tags = doc.get("tags")
|
||||
if tags is not None:
|
||||
user_tags, system_tags = partition_tags(
|
||||
name, tags, doc.get("system_tags", [])
|
||||
)
|
||||
collection.update_one(
|
||||
{"_id": doc["_id"]},
|
||||
{"$set": {"system_tags": system_tags, "tags": user_tags}}
|
||||
)
|
||||
Reference in New Issue
Block a user