tests/functional/commands/conftest.py
def ensure_deterministic_id(name, db_instance, version=1, update=None):
    """Change the id of experiment to its name."""
    experiment = db_instance.read("experiments", {"name": name, "version": version})[0]
    db_instance.remove("experiments", {"_id": experiment["_id"]})
    _id = name + "_" + str(version)
    experiment["_id"] = _id

    if experiment["refers"]["parent_id"] is None:
        experiment["refers"]["root_id"] = _id

    if update is not None:
        experiment.update(update)

    db_instance.write("experiments", experiment)
Change the id of experiment to its name.
Change the id of experiment to its name.
Change the id of experiment to its name .
def ensure_deterministic_id(name, db_instance, version=1, update=None):
    experiment = db_instance.read("experiments", {"name": name, "version": version})[0]
    db_instance.remove("experiments", {"_id": experiment["_id"]})
    _id = name + "_" + str(version)
    experiment["_id"] = _id
    if experiment["refers"]["parent_id"] is None:
        experiment["refers"]["root_id"] = _id
    if update is not None:
        experiment.update(update)
    db_instance.write("experiments", experiment)
def ensure_deterministic_id ( name , db_instance , version = 1 , update = None ) : experiment = db_instance . read ( "experiments" , { "name" : name , "version" : version } ) [ 0 ] db_instance . remove ( "experiments" , { "_id" : experiment [ "_id" ] } ) _id = name + "_" + str ( version ) experiment [ "_id" ] = _id if experiment [ "refers" ] [ "parent_id" ] is None : experiment [ "refers" ] [ "root_id" ] = _id if update is not None : experiment . update ( update ) db_instance . write ( "experiments" , experiment )
Change the id of experiment to its name.
Change the id of experiment to its name .
"""Change the id of experiment to its name."""
name
db_instance
version
update