Conversation
|
Thanks @kerry-he quoted the offline discussion here for transparency: |
|
/kind feature |
|
Fixed, tags are now a separarate field and uses its own table. |
| experiment_id = Column(UUID(as_uuid=True), nullable=False) | ||
| tag = Column(String, nullable=False) | ||
|
|
||
| created_at = Column(DateTime(timezone=True), default=lambda: datetime.now(UTC)) |
There was a problem hiding this comment.
Can we add the updated_at for consistency
alphatrion/storage/sqlstore.py
Outdated
| exp_tag = ExperimentTag( | ||
| team_id=team_id, | ||
| experiment_id=uid, | ||
| tag=tag.strip(), |
alphatrion/storage/sqlstore.py
Outdated
| .join(ExperimentTag, ExperimentTag.experiment_id == Experiment.uuid) | ||
| .filter( | ||
| Experiment.team_id == team_id, | ||
| Experiment.is_del == 0, |
There was a problem hiding this comment.
move the is_del==0 under tag, or index team_id & tag will not work
| ) as exp: | ||
| exp_obj = exp._get_obj() | ||
| assert exp_obj is not None | ||
|
|
There was a problem hiding this comment.
Can you add one more assert that there're two records in the experiment_tags table.
| ) -> list[Experiment]: | ||
| metadb = runtime.storage_runtime().metadb | ||
| if label_name: | ||
| if tag: |
There was a problem hiding this comment.
One potential problem here is what if label name and tag are both selected. We should either clear another one in the frontend or support filtering the database with both two. But not a big concern.
|
You can use make format to format all the codes in case of lint validation failure. |
|
I guess you still need to run Then we're ready to merge |
|
/lgtm Thanks @kerry-he |
What this PR does / why we need it
Allows tags to be specified as a list of strings, e.g.,
I will add a separate PR to account for this in the dashboard UI.
Which issue(s) this PR fixes
Fixes #209
Special notes for your reviewer
Does this PR introduce a user-facing change?