Skip to content

Commit

Permalink
[ZetaCloud]
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye committed Dec 21, 2023
1 parent f341442 commit 7be1d82
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 56 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ out.shape


### ZetaCloud
Train or finetune any model on any cluster in 1 click with zetacloud, just pass in your file and the GPU type and quantity you want! To gain access first `pip install zetascale` then run `zeta -h` in the terminal.
Train or finetune any model on any cluster in 1 click with zetacloud, just pass in your file and the GPU type and quantity you want! To gain access first `pip install zetascale` then run `zeta -h` in the terminal. [Here is the docs for more](https://zeta.apac.ai/en/latest/zeta/cloud/main/)

- Flexible Pricing with pooling from many clouds
- Easy Deployment with 1 click
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "zetascale"
version = "1.2.0"
version = "1.2.1"
description = "Transformers at zeta scales"
authors = ["Zeta Team <kye@apac.ai>"]
license = "MIT"
Expand Down
73 changes: 19 additions & 54 deletions zeta/utils/disable_logging.py
Original file line number Diff line number Diff line change
@@ -1,48 +1,3 @@
# import logging
# import os
# import warnings


# def disable_warnings_and_logs():
# """
# Disables various warnings and logs.
# """
# # disable warnings
# warnings.filterwarnings("ignore")

# # disable tensorflow warnings
# os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2"

# # disable bnb warnings and others
# logging.getLogger().setLevel(logging.WARNING)

# class CustomFilter(logging.Filter):
# def filter(self, record):
# unwanted_logs = [
# "Setting ds_accelerator to mps (auto detect)",
# (
# "NOTE: Redirects are currently not supported in Windows or"
# " MacOs."
# ),
# ]
# return not any(log in record.getMessage() for log in unwanted_logs)

# # add custom filter to root logger
# logger = logging.getLogger()
# f = CustomFilter()
# logger.addFilter(f)

# # disable specific loggers
# loggers = [
# "real_accelerator",
# "torch.distributed.elastic.multiprocessing.redirects",
# ]

# for logger_name in loggers:
# logger = logging.getLogger(logger_name)
# logger.setLevel(logging.CRITICAL)


import logging
import os
import warnings
Expand All @@ -51,15 +6,6 @@ def disable_warnings_and_logs():
"""
Disables various warnings and logs.
"""
# disable warnings
warnings.filterwarnings("ignore")

# disable tensorflow warnings
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2"

# disable bnb warnings and others
logging.getLogger().setLevel(logging.WARNING)

class CustomFilter(logging.Filter):
def filter(self, record):
unwanted_logs = [
Expand All @@ -71,10 +17,29 @@ def filter(self, record):
]
return not any(log in record.getMessage() for log in unwanted_logs)

# disable warnings
warnings.filterwarnings("ignore")

# disable tensorflow warnings
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2"

# disable bnb warnings and others
logging.getLogger().setLevel(logging.WARNING)

# add custom filter to root logger
logger = logging.getLogger()
f = CustomFilter()
logger.addFilter(f)

# disable specific loggers
loggers = [
"real_accelerator",
"torch.distributed.elastic.multiprocessing.redirects",
]

for logger_name in loggers:
logger = logging.getLogger(logger_name)
logger.setLevel(logging.CRITICAL)

# disable all loggers
logging.disable(logging.CRITICAL)

0 comments on commit 7be1d82

Please sign in to comment.