Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 18, 2023
1 parent 519d308 commit 5aa57bf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ RUN python3 -m pip install --break-system-packages -r tests/requirements.txt

COPY . ./

RUN python3 -m pip install --break-system-packages .
RUN python3 -m pip install --break-system-packages .
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ services:
dockerfile: Dockerfile
volumes:
- ./src:/app/src
- ./tests:/app/tests
- ./tests:/app/tests
2 changes: 1 addition & 1 deletion src/lightning_hivemind/strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def __init__(
wait_timeout=wait_timeout,
bootstrap_timeout=bootstrap_timeout,
use_relay=use_relay,
use_auto_relay=use_auto_relay
use_auto_relay=use_auto_relay,
)

visible_addresses = [
Expand Down
9 changes: 3 additions & 6 deletions tests/test_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def configure_optimizers(self):
)
trainer.fit(model)


@mock.patch.dict(os.environ, {"HIVEMIND_MEMORY_SHARING_STRATEGY": "file_descriptor"}, clear=True)
def test_ipfs_integration():
class TestModel(BoringModel):
Expand All @@ -82,16 +83,12 @@ def configure_optimizers(self):

model = TestModel()
trainer = Trainer(
strategy=HivemindStrategy(
target_batch_size=1,
use_ipfs=True,
use_relay=True,
use_auto_relay=True
),
strategy=HivemindStrategy(target_batch_size=1, use_ipfs=True, use_relay=True, use_auto_relay=True),
fast_dev_run=True,
)
trainer.fit(model)


@mock.patch.dict(
os.environ,
{
Expand Down

0 comments on commit 5aa57bf

Please sign in to comment.