Skip to content

Commit

Permalink
fix pyprojec.toml and pre-commit wandb issues (#712)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlwh committed Aug 29, 2024
1 parent 97358f9 commit 4913df2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ repos:
hooks:
- id: mypy
args: [--ignore-missing-imports]
additional_dependencies: [wandb, types-PyYAML]
additional_dependencies: [wandb==0.17.8, types-PyYAML]
15 changes: 4 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies = [
"tokenizers>=0.15.2",
"transformers>=4.41.2",
"optax>=0.1.9",
"wandb>=0.16.6,<0.17.6",
"wandb>=0.17.8",
"scipy<=1.12.0",
"draccus>=0.8.0",
"pyarrow>=11.0.0",
Expand Down Expand Up @@ -105,13 +105,6 @@ test = [
"pytest-asyncio",
]

#[tool.setuptools.packages.find]
#where = ["src"]
#include = ["levanter", "levanter.*"]


[tool.setuptools]
packages = ["levanter"]

[tool.setuptools.package-dir]
levanter = "src/levanter"
[tool.setuptools.packages.find]
where = ["src"]
include = ["levanter", "levanter.*"]
6 changes: 3 additions & 3 deletions src/levanter/tracker/wandb.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ def init(self, run_id: Optional[str]) -> WandbTracker:
if wandb.run is not None:
wandb.run.log_artifact(str(requirements_path), name="requirements.txt", type="requirements")

wandb.summary["num_devices"] = jax.device_count()
wandb.summary["num_hosts"] = jax.process_count()
wandb.summary["backend"] = jax.default_backend()
wandb.summary["num_devices"] = jax.device_count() # type: ignore
wandb.summary["num_hosts"] = jax.process_count() # type: ignore
wandb.summary["backend"] = jax.default_backend() # type: ignore

return WandbTracker(r)

Expand Down

0 comments on commit 4913df2

Please sign in to comment.