Skip to content

Fix model-element assets getting duplicated directory on copy#18

Merged
dsblank merged 1 commit intomainfrom
fix-model-element-copy-duplication
Feb 13, 2026
Merged

Fix model-element assets getting duplicated directory on copy#18
dsblank merged 1 commit intomainfrom
fix-model-element-copy-duplication

Conversation

@dsblank
Copy link
Copy Markdown
Collaborator

@dsblank dsblank commented Feb 13, 2026

Summary

  • Fixed cometx copy creating duplicated directory structures for model-element assets (e.g., model.onnx/model.onnx)
  • Root cause: experiment.log_model(name, file) was using the file's basename as the model name, causing each file to become its own model folder
  • Fix: Use experiment._log_asset() directly with grouping_name extracted from the asset's dir metadata field, stripping the models/ prefix that the backend adds automatically

Test plan

  • Downloaded experiment dsblank/general/e7e58746cc3d4302acc36bae917dfc57 with model-element assets
  • Copied to dsblank/model-test and verified model assets no longer show duplicated directory structure

🤖 Generated with Claude Code

When copying model-element assets, log_model() was called with the
file's basename as the model name (e.g., "model.onnx"), causing a
duplicate folder structure like model.onnx/model.onnx. Instead, use
_log_asset() directly with the correct grouping_name extracted from
the asset's "dir" metadata field, stripping the "models/" prefix
that the backend adds automatically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dsblank dsblank merged commit 6ef4548 into main Feb 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant