aim 目标迁移:"无法跟踪类型为...的值,不支持该类型,"

r6hnlfcb  于 3个月前  发布在  其他
关注(0)|答案(1)|浏览(88)

🐛 Bug

尝试从 v3.17 迁移仓库到 v4 时出现:

λ aim migrate --repo /home/mulhaq/tmp/test_v3.x
Failed to migrate Aim repo '/home/mulhaq/tmp/test_v3.x'. Reason: Cannot track value '[12.684123]' of type <class 'list'>. Type is not supported..
Old repository backup is available at '/home/mulhaq/tmp/test_v3.x/.aim_v3'.
Traceback (most recent call last):
  File "/home/mulhaq/.local/bin_python/aim", line 8, in <module>
    sys.exit(cli_entry_point())
             ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/aimcore/cli/migrate/commands.py", line 35, in migrate
    utils.migrate_data_v3_v4(repo_inst, aim_v3_dir_path, run_hash=run)
  File "/usr/lib/python3.11/site-packages/aimcore/cli/migrate/utils.py", line 186, in migrate_data_v3_v4
    migrate_single_run(repo, v3_repo_path, run_hash=run_hash, run_data=runs_data.get(run_hash))
  File "/usr/lib/python3.11/site-packages/aimcore/cli/migrate/utils.py", line 125, in migrate_single_run
    migrate_v1_sequence_data(
  File "/usr/lib/python3.11/site-packages/aimcore/cli/migrate/utils.py", line 71, in migrate_v1_sequence_data
    seq.track(value, step=step, epoch=epoch, time=time)
  File "/usr/lib/python3.11/site-packages/aim/_sdk/sequence.py", line 221, in track
    raise ValueError(f'Cannot track value \'{value}\'of type {type(value)}. Type is not supported.')
ValueError: Cannot track value '[12.684123]' of type <class 'list'>. Type is not supported.

附加的(不相关的)错误 -- aimrocks.errors.RocksIOError: b'IO error: No such file or directory: While open a file for appending: /home/mulhaq/tmp/test_v3.x/.aim/data/000032.log: No such file or directory'

Exception in thread Thread-4 (_cleanup):
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.11/site-packages/aimcore/cleanup/__init__.py", line 87, in _cleanup
    finalizer()
  File "/usr/lib/python3.11/weakref.py", line 590, in __call__
    return info.func(*info.args, **(info.kwargs or {}))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "src/python/aim/_core/storage/rockscontainer.pyx", line 47, in aim._core.storage.rockscontainer.RocksAutoClean._close
  File "src/aimrocks/lib_rocksdb.pyx", line 1825, in aimrocks.lib_rocksdb.DB.flush
  File "src/aimrocks/lib_rocksdb.pyx", line 1832, in aimrocks.lib_rocksdb.DB.flush
  File "src/aimrocks/lib_rocksdb.pyx", line 89, in aimrocks.lib_rocksdb.check_status
aimrocks.errors.RocksIOError: b'IO error: No such file or directory: While open a file for appending: /home/mulhaq/tmp/test_v3.x/.aim/data/000032.log: No such file or directory'

重现步骤

在 v3 中记录一个类型为 list[float] 的序列值。(或者下载 test v3.x repo )然后迁移到 v4。

wget https://github.com/aimhubio/aim/files/12750201/aim_issue_3019_test_v3.x.tar.gz
tar xf aim_issue_3019_test_v3.x.tar.gz
cd test_v3.x
printf "y" | aim migrate --repo "$PWD"

不确定 list[float] 如何将日志记录在序列中。看起来像是 len(value) == 1 ,尽管如此。

预期行为

成功迁移,或者可能是 "警告:无法迁移 [...];跳过序列 [...] 以运行哈希 [...]"。

环境

  • Aim 版本 4.0.0
  • Python 版本 3.11
  • pip 版本 23.2.1
  • OS Arch Linux
  • 其他相关信息

额外背景信息

zazmityj

zazmityj1#

嘿,@YodaEmbedding!感谢你报告这个问题。很高兴知道你在尝试迁移命令🙌
对于这个特定情况,我认为包含单个浮点值的列表应该被接受。对于更一般的情况,数据仍然应该被迁移,尽管不是作为度量或其他特定类型,而只是作为通用序列。
请让我知道如果你有任何评论/补充。

相关问题