OpenMythosのサンプルプログラムを動かしました

1.概要 前回、OpenMythosの環境構築まで実現したので、GitHubにあるサンプルプログラム(Usage)を動かしてみました。一部エラーが発生しましたが、結果出力部分なので修正をしました。その内容を記述します。 2.詳細 Usageに記載されているPythonプログラムをopenmythos_usage.pyとして作成します。 $ source ~/mypy/bin/activate (mypy) $ pythoh3 openmythos_usage.py 下記エラーとなります [MLA] Parameters: 1,538,626 [MLA] Logits shape: torch.Size([2, 16, 1000]) [MLA] Generated shape: torch.Size([2, 24]) Traceback (most recent call last):   File "/home/nakasima/openmythos/openmythos_usage.py", line 48, in <module>     rho = torch.linalg.eigvals(A).abs().max().item()           ^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: linalg.eig: The input tensor A must have at least 2 dimensions. コードの下記部分を修正します #rho = torch.linalg.eigvals(A).abs().max().item() rho = A.abs().max().item() $ source ~/mypy/bin/activate (mypy) $ pythoh3 openmythos_usage.py [MLA] Parameters: 1,538,626 [MLA] Logits shape: torch.Size([2, 16, 1000]) [MLA] Generated shape: torch.Size([2, 24]) [MLA] Spectral radius ρ(A) = 0.3679 (mus...

postgresql-clientのupgradeでエラー発生

1.概要

ubuntuのupdateを実行すると、下記postgresqlでエラーになりました。導入環境からpostgresql-clientが原因と思って調べました。その内容を記述します。

N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease' doesn't support architecture 'i386'

2.詳細

postgresql-client-14をubuntu-20.04上に手順に沿って導入をしました。導入直後は何も問題がなかったのですが、ubuntuをupdateしようとするとエラーです。どうやらi386はサポートされないようで、更新もできないようです。

参考資料に修正手順が記述されていました。

インストール手順の最初の部分に問題があります。

# Create the file repository configuration:
sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

これを以下のように[arch=amd64]を追加して、実行します。
/etc/apt/sources.list.d/pgdg.listが変わっていることを確認します。
その後、ubuntuのupdateを実行すると問題改善です。

# Create the file repository configuration:
sudo sh -c 'echo "deb [arch=amd64] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

または、/etc/apt/sources.list.d/pgdg.listを直接変更してもOKです

参考資料
[外部サイト参照]
Linux downloads (Ubuntu) 
apt error: repository doesn't support architecture 'i386'

コメント

このブログの人気の投稿

miniPCのBMAXでWindows11のsecure boot設定漏れでトラブル発生

LinuxMint-22.3にWine 11.6をサクッと入れてみました

LinuxMint 21.3にWinBoat導入を試してみました