takumiohym / practical-ml-vision-book-ja Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Use nb_translator
Use automation code of #3.
!pip install tf-models-official==2.9.2
を実行しようとするとエラーが出ます。
エラーコードを見ると、tf-models-official のインストール時に pyyaml の特定のバージョン(>=5.1,<6.0)が必要とされていますが、それをビルドする際に問題が発生しているようでした。
試したこととしては、以下のコードでpyyamlのバージョンを指定しましたが、うまく行きませんでした。
!pip install 'pyyaml>=5.1,<6.0'
また以下のコードでpyyamlの代わりにruamel.yamlを使用することを試してみましたが、同様にうまく行きませんでした。
!pip install ruamel.yaml
import sys
import ruamel.yaml
sys.modules['pyyaml'] = ruamel.yaml
お手数ですが、解説法をご教授頂けると幸いです。
エラー全文を以下に掲載します。
Collecting pyyaml<6.0,>=5.1 (from tf-models-official==2.9.2)
Using cached PyYAML-5.4.1.tar.gz (175 kB)
Installing build dependencies ... done
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Each training code assuming some environment.
Introduce accelerator check to work on various environment.
# Detect accelerator type
try: # detect TPUs
tpu = tf.distribute.cluster_resolver.TPUClusterResolver.connect()
strategy = tf.distribute.TPUStrategy(tpu)
except ValueError: # detect GPUs or multi-GPU machines
strategy = tf.distribute.MirroredStrategy()
...
# Setup different variables based on accelerators.
if type(strategy) == tf.distribute.MirroredStrategy:
... # GPU setup
elif type(strategy) == tf.distribute.TPUStrategy:
... # TPU setup
Container pass project id should be modified.
https://github.com/takumiohym/practical-ml-vision-book-ja/blob/main/10_mlops/10a_mlpipeline.ipynb
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.