fkubota / carrier-owl Goto Github PK
View Code? Open in Web Editor NEWarxiv--> DeepL --> Slack/LINE
License: MIT License
arxiv--> DeepL --> Slack/LINE
License: MIT License
github actionsの手動実行を楽にするためにやる。
https://twitter.com/hpp_ricecake/status/1343447022486003713?s=20
amagaeruさんのPR
SecretsにLINE_IDとして登録する。
Secretsが複数用意されていればそれら全てに通知がいくような仕様にする。
固有名詞をタイトルにしている論文もあるのでわざわざ翻訳しなくてもよいのかなと思いました。
score => threshold
を満たしたものだけ通知する。
arXivにはPublicなarXivAPIが存在するので、そちらを使うほうが正しいアクセスの方法かと思います。
Carrier-Owl/src/carrier_owl.py
Lines 54 to 62 in 5460771
でtitleも改行のreplaceを行なったほうがいいかもしれない、という提案になります。
60行目に以下を挿入するだけになります。
title = title.replace('\n', '')
例えば以下の論文では改行置換ありなしでdeeplの結果が変わっていました。
url: http://arxiv.org/abs/2205.00779v1
改行置換なし
title: ゼブラ ゼロブロックによるCNNアクセラレータのメモリ帯域幅の削減
活性化マップの正則化
title_en: Zebra: Memory Bandwidth Reduction for CNN Accelerators With Zero Block
Regularization of Activation Maps
改行置換あり
title: ゼブラ 活性化マップのゼロブロック正則化を用いたCNNアクセラレータのメモリ帯域幅の削減
title_en: Zebra: Memory Bandwidth Reduction for CNN Accelerators With Zero Block Regularization of Activation Maps
論文のタイトルには改行が含まれておらず、arxiv.queryの結果には含まれているのでarxiv.queryのところで何とかして欲しい気持ちですが、↓を見る限りは使う側で対処した方が良さそうかなという感じです。
Workflow がしばしば失敗します。
エラーメッセージと、メッセージから推測できる直接的な原因を以下に記載します。
■エラーメッセージ
Run poetry run python src/carrier-owl.py
poetry run python src/carrier-owl.py
shell: /bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.8.6/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.6/x64/lib
SLACK_ID: ***
Traceback (most recent call last):
File "src/carrier-owl.py", line 188, in <module>
main()
File "src/carrier-owl.py", line 183, in main
results = serch_keywords(id_list, config['keywords'])
File "src/carrier-owl.py", line 64, in serch_keywords
title = bs.find('meta', attrs={'property': 'og:title'})['content']
TypeError: 'NoneType' object is not subscriptable
Error: Process completed with exit code 1.
■直接的な原因
src/carrier-owl.py の serch_keywords()関数にて、
bs.find('meta', attrs={'property': 'og:title'}) の戻り値がNoneになっている
Carrier-Owlをクローンして利用させてもらっているものです。素敵なシステム作成ありがとうございます。
急にGithub Actionがエラーでワークしなくなったので確認したところ以下の画像のエラーが出ていました。
(私の環境だけでしたらすいません)
解決案として
の2つが考えられます。前者だと毎回アップデートのたびに追従するのが負担かなという懸念があります。
私の方でもchromedriverをアップデートしてPRしようとしましたがインストール時にコケてしまうのでまず報告だけさせてもらいました。
chromedriver-binary v87 -> v89
https://pypi.org/project/chromedriver-binary/89.0.4389.23.0/
fork後にgithub actionsを有効にしなければならないのでその説明。
https://arxiv.org/help/api/user-manual#query_details
5.3. Subject Classifications
astro-ph | Astrophysics |
---|---|
astro-ph.CO | Cosmology and Nongalactic Astrophysics |
astro-ph.EP | Earth and Planetary Astrophysics |
... |
出力されるアブストラクトに改行を入れていると思いますが、何か意図があるのでしょうか(slackだと見づらいなど)。
私は改行を取り除いてlineに通知していますが、他の方の意見も聞きたいと思いissueを立てました。
(2日前の論文を送る場合)
月火水木金に送信するように設定を行うと、土日にarxivが更新されない以上、水木金にしか配信されない。
これを解消したい。
--slack_id, --line_token を追加
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.