Skip to content

Commit 0cfacfa

Browse files
committed
Fix imports
Signed-off-by: Elron Bandel <[email protected]>
1 parent 9374a8f commit 0cfacfa

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ target-version = "py38"
4444
"src/unitxt/operators.py" = ["C901"]
4545
"docs/conf.py" = ["E402"]
4646
"prepare/instructions/models/llama.py" = ["RUF001"]
47+
"utils/hf/prepare_dataset.py" = ["T201"]
48+
"utils/hf/prepare_metric.py" = ["T201"]
4749

4850
[tool.ruff.lint]
4951
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.

utils/hf/prepare_dataset.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@
33

44
from huggingface_hub import HfApi
55

6-
from src.unitxt.logging_utils import get_logger
7-
8-
logger = get_logger()
9-
106
files = glob.glob("./src/unitxt/*.py")
117

128
api = HfApi(token=os.environ["HUGGINGFACE_HUB_TOKEN"])
139

14-
logger.info("Uploading files from src/unitxt/ to hf:unitxt/data")
10+
print("Uploading files from src/unitxt/ to hf:unitxt/data")
1511

1612
for file in files:
1713
file_name = os.path.basename(file)
@@ -22,7 +18,7 @@
2218
if file_name == "dataset.py":
2319
file_name = "data.py"
2420

25-
logger.info(f" - {file_name}")
21+
print(f" - {file_name}")
2622

2723
api.upload_file(
2824
path_or_fileobj=file,

utils/hf/prepare_metric.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,19 @@
33

44
from huggingface_hub import HfApi
55

6-
from src.unitxt.logging_utils import get_logger
7-
8-
logger = get_logger()
9-
106
files = glob.glob("./src/unitxt/*.py")
117

128
api = HfApi(token=os.environ["HUGGINGFACE_HUB_TOKEN"])
139

14-
logger.info("\nUploading files from src/unitxt/ to hf:unitxt/metric")
10+
print("\nUploading files from src/unitxt/ to hf:unitxt/metric")
1511

1612
for file in files:
1713
file_name = os.path.basename(file)
1814

1915
if file_name == "__init__.py":
2016
continue
2117

22-
logger.info(f" - {file_name}")
18+
print(f" - {file_name}")
2319

2420
api.upload_file(
2521
path_or_fileobj=file,

0 commit comments

Comments
 (0)