فهرست منبع

Update .gitignore

Michael Diskin 3 سال پیش
والد
کامیت
0503292284
3فایلهای تغییر یافته به همراه83 افزوده شده و 10 حذف شده
  1. 80 2
      .gitignore
  2. 2 7
      hivemind/averaging/averager.py
  3. 1 1
      hivemind/dht/__init__.py

+ 80 - 2
.gitignore

@@ -14,6 +14,7 @@ env.sh
 # Byte-compiled / optimized / DLL files
 __pycache__/
 *.py[cod]
+*$py.class
 
 # C extensions
 *.so
@@ -38,6 +39,12 @@ share/python-wheels/
 *.egg
 MANIFEST
 
+# PyInstaller
+#  Usually these files are written by a python script from a template
+#  before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
 # Installer logs
 pip-log.txt
 pip-delete-this-directory.txt
@@ -45,13 +52,21 @@ pip-delete-this-directory.txt
 # Unit test / coverage reports
 htmlcov/
 .tox/
+.nox/
 .coverage
+.coverage.*
 .cache
 nosetests.xml
 coverage.xml
+*.cover
+*.py,cover
+.hypothesis/
+.pytest_cache/
+cover/
 
 # Translations
 *.mo
+*.pot
 
 # Mr Developer
 .mr.developer.cfg
@@ -59,19 +74,82 @@ coverage.xml
 .pydevproject
 .idea
 .vscode
-.ipynb_checkpoints
 
 # Rope
 .ropeproject
 
 # Django stuff:
 *.log
-*.pot
+local_settings.py
+db.sqlite3
+db.sqlite3-journal
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
 
 # Sphinx documentation
 docs/_build/
 docs/tmp*
 
+# PyBuilder
+.pybuilder/
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# IPython
+profile_default/
+ipython_config.py
+
+
+# PEP 582; used by e.g. github.com/David-OConnor/pyflow
+__pypackages__/
+
+# Celery stuff
+celerybeat-schedule
+celerybeat.pid
+
+# SageMath parsed files
+*.sage.py
+
+# Environments
+.env
+.venv
+env/
+venv/
+ENV/
+env.bak/
+venv.bak/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+.dmypy.json
+dmypy.json
+
+# Pyre type checker
+.pyre/
+
+# pytype static type analyzer
+.pytype/
+
+# Cython debug symbols
+cython_debug/
+
 # OS X garbage
 .DS_Store
 

+ 2 - 7
hivemind/averaging/averager.py

@@ -22,12 +22,7 @@ from hivemind.averaging.group_info import GroupInfo
 from hivemind.averaging.load_balancing import load_balance_peers
 from hivemind.averaging.matchmaking import Matchmaking, MatchmakingException
 from hivemind.averaging.partition import DEFAULT_PART_SIZE_BYTES
-from hivemind.compression import (
-    CompressionBase,
-    CompressionInfo,
-    NoCompression,
-    deserialize_torch_tensor
-)
+from hivemind.compression import CompressionBase, CompressionInfo, NoCompression, deserialize_torch_tensor
 from hivemind.dht import DHT, DHTID
 from hivemind.p2p import P2P, P2PContext, P2PHandlerError, PeerID, ServicerBase
 from hivemind.p2p.p2p_daemon_bindings.utils import ControlFailure, DispatchFailure
@@ -40,7 +35,7 @@ from hivemind.utils.asyncio import (
     as_aiter,
     azip,
     enter_asynchronously,
-    switch_to_uvloop
+    switch_to_uvloop,
 )
 from hivemind.utils.grpc import combine_from_streaming, split_for_streaming
 from hivemind.utils.serializer import MSGPackSerializer, SerializerBase

+ 1 - 1
hivemind/dht/__init__.py

@@ -16,5 +16,5 @@ The code is organized as follows:
 from hivemind.dht.dht import DHT
 from hivemind.dht.node import DEFAULT_NUM_WORKERS, DHTNode
 from hivemind.dht.routing import DHTID, DHTKey, DHTValue, Subkey
-from hivemind.utils import DHTExpiration
 from hivemind.dht.validation import CompositeValidator, RecordValidatorBase
+from hivemind.utils import DHTExpiration