Comments (9)
unfortunately, i was not able to reproduce it the way you described.
however, ive added a check and it wont push dataset tag when using a local dataset.
please upgrade to 0.7.98+ & let me know if you still face this issue.
from autotrain-advanced.
@abhishekkrthakur Unfortunately, this issues is still present in version 0.7.101. I'm still receiving the same error using the same config and CLI command. I think the issue is related to when the data path is a absolute path like /var/hf/images
from autotrain-advanced.
i tried the same with absolute path too. didnt receive any error. from the code, your problem is visibly resolved. could you please confirm? also, can you provide full logs?
from autotrain-advanced.
Yes, I just received the following error when using the previously provided config and CLI command. I confirmed I was using version 0.7.101 with autotrain --version
.
train has failed due to an exception: Traceback (most recent call last):
File "/app/env/lib/python3.10/site-packages/huggingface_hub/utils/_errors.py", line 304, in hf_raise_for_status
response.raise_for_status()
File "/app/env/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://huggingface.co/api/validate-yaml
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/env/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 3761, in create_commit
hf_raise_for_status(response)
File "/app/env/lib/python3.10/site-packages/huggingface_hub/utils/_errors.py", line 358, in hf_raise_for_status
raise BadRequestError(message, response=response) from e
huggingface_hub.utils._errors.BadRequestError: (Request ID: Root=1-664a4963-5f30158c220e06ea4643c70e;3e0063dc-b80f-44aa-911a-0836a334f510)
Bad request:
"datasets[0]" with value "/var/hf/images/" is not valid. If possible, use a dataset id from https://hf.co/datasets.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/env/lib/python3.10/site-packages/autotrain/trainers/common.py", line 117, in wrapper
return func(*args, **kwargs)
File "/app/env/lib/python3.10/site-packages/autotrain/trainers/image_classification/__main__.py", line 208, in train
api.upload_folder(
File "/app/env/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 119, in _inner_fn
return fn(*args, **kwargs)
File "/app/env/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 1230, in _inner
return fn(self, *args, **kwargs)
File "/app/env/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 4807, in upload_folder
commit_info = self.create_commit(
File "/app/env/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 119, in _inner_fn
return fn(*args, **kwargs)
File "/app/env/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 1230, in _inner
return fn(self, *args, **kwargs)
File "/app/env/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 3765, in create_commit
raise ValueError(f"Invalid metadata in README.md.\n{message}") from e
ValueError: Invalid metadata in README.md.
- "datasets[0]" with value "/var/hf/images/" is not valid. If possible, use a dataset id from https://hf.co/datasets.
from autotrain-advanced.
in the output folder, you must have README.md. could you please copy paste its contents?
from autotrain-advanced.
Here's the README.md from the model output folder:
---
tags:
- autotrain
- image-classification
widget:
- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/tiger.jpg
example_title: Tiger
- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/teapot.jpg
example_title: Teapot
- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/palace.jpg
example_title: Palace
datasets:
- /var/hf/images
---
# Model Trained Using AutoTrain
- Problem type: Image Classification
## Validation Metrics
loss: 0.7285889387130737
f1: 0.5
precision: 0.6666666666666666
recall: 0.4
auc: 0.52
accuracy: 0.6
I've also attached the full log files.
May22_17-11-20_c2798dce683b.zip
from autotrain-advanced.
I just ran this config:
task: image-classification
base_model: google/vit-base-patch16-224
project_name: autotrain-ai-image-detect
log: tensorboard
backend: local
data:
path: /Users/abhishek/Downloads/Datasets/image_classification/flowers
train_split: train
valid_split: null
column_mapping:
image_column: image
target_column: label
params:
lr: 0.00005
epochs: 1
batch_size: 8
warmup_ratio: 0.1
gradient_accumulation: 1
optimizer: adamw_torch
scheduler: linear
weight_decay: 0
max_grad_norm: 1
seed: 42
logging_steps: -1
auto_find_batch_size: false
mixed_precision: none
save_total_limit: 1
evaluation_strategy: epoch
early_stopping_patience: 5
early_stopping_threshold: 0.01
hub:
username: ${HF_USERNAME}
token: ${HF_TOKEN}
push_to_hub: true
with the command:
autotrain --config /Users/abhishek/Downloads/Datasets/config.yml
from /Users/abhishek
and it worked successfully and my model was pushed to hub.
The readme contents didnt contain dataset tag:
---
tags:
- autotrain
- image-classification
widget:
- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/tiger.jpg
example_title: Tiger
- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/teapot.jpg
example_title: Teapot
- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/palace.jpg
example_title: Palace
---
# Model Trained Using AutoTrain
- Problem type: Image Classification
## Validation Metrics
loss: 0.046192716807127
f1_macro: 0.9831967159545663
f1_micro: 0.9833948339483395
f1_weighted: 0.9833459803821667
precision_macro: 0.9842701698279861
precision_micro: 0.9833948339483395
precision_weighted: 0.9835024125781294
recall_macro: 0.9823230808554145
recall_micro: 0.9833948339483395
recall_weighted: 0.9833948339483395
accuracy: 0.9833948339483395
It seems like you have some version conflict. do you mind installing autotrain in a new environment and try?
from autotrain-advanced.
I just ran that same config and got this error:
train has failed due to an exception: Traceback (most recent call last):
File "/app/env/lib/python3.10/site-packages/huggingface_hub/utils/_errors.py", line 304, in hf_raise_for_status
response.raise_for_status()
File "/app/env/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://huggingface.co/api/validate-yaml
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/env/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 3668, in create_commit
hf_raise_for_status(response)
File "/app/env/lib/python3.10/site-packages/huggingface_hub/utils/_errors.py", line 358, in hf_raise_for_status
raise BadRequestError(message, response=response) from e
huggingface_hub.utils._errors.BadRequestError: (Request ID: Root=1-664e3758-2faaa1f35dcca87b0c0b2c90;11bae101-997f-41e3-95e9-46b4d229763b)
Bad request:
"datasets[0]" with value "/Users/abhishek/Downloads/Datasets/image_classification/flowers" is not valid. If possible, use a dataset id from https://hf.co/datasets.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/env/lib/python3.10/site-packages/autotrain/trainers/common.py", line 117, in wrapper
return func(*args, **kwargs)
File "/app/env/lib/python3.10/site-packages/autotrain/trainers/image_classification/__main__.py", line 226, in train
api.upload_folder(
File "/app/env/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/app/env/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 1286, in _inner
return fn(self, *args, **kwargs)
File "/app/env/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 4724, in upload_folder
commit_info = self.create_commit(
File "/app/env/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/app/env/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 1286, in _inner
return fn(self, *args, **kwargs)
File "/app/env/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 3672, in create_commit
raise ValueError(f"Invalid metadata in README.md.\n{message}") from e
ValueError: Invalid metadata in README.md.
- "datasets[0]" with value "/Users/abhishek/Downloads/Datasets/image_classification/flowers" is not valid. If possible, use a dataset id from https://hf.co/datasets.
The README.md content for the output model is:
---
tags:
- autotrain
- image-classification
widget:
- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/tiger.jpg
example_title: Tiger
- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/teapot.jpg
example_title: Teapot
- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/palace.jpg
example_title: Palace
datasets:
- /Users/abhishek/Downloads/Datasets/image_classification/flowers
---
# Model Trained Using AutoTrain
- Problem type: Image Classification
## Validation Metrics
No validation metrics available
I'm running autotrain in a docker container built from this Dockerfile:
FROM huggingface/autotrain-advanced:latest
RUN pip uninstall -y autotrain-advanced
RUN pip install -U autotrain-advanced
CMD export HF_USERNAME=$(cat $HF_USER_FILE) && \
export HF_TOKEN=$(cat $HF_TOKEN_FILE) && \
bash
When I run which autotrain
I get this: /app/env/bin/autotrain
. And the current version is now 0.7.104
.
I've deleted and rebuilt the container but get the same error.
from autotrain-advanced.
thanks. hopefully fixed in 0.7.106+ by adding one more check around dataset tag.
latest image is currently building: https://github.com/huggingface/autotrain-advanced/actions/runs/9196666390/job/25295280759
from autotrain-advanced.
Related Issues (20)
- [BUG] BuilderConfig 'qa' not found, when finetunnig custom embedding models HOT 2
- 404 or too many times HOT 3
- [FEATURE REQUEST]API of pony-diffusion-v6 is no longer displayed. HOT 7
- [BUG] "output tensor must have the same type as input tensor" error when i tried to finetune localy
- AutoTrain says "This space has been paused by owner" when I am not doing it. HOT 1
- can i use this on a orange pi 5? or cpu only? HOT 2
- [BUG] ImportError: cannot import name 'get_full_repo_name' from 'huggingface_hub' HOT 2
- NEFT noise alpha request HOT 1
- [BUG] Incorrect Sort Parameter in fetch_models function HOT 3
- [FEATURE REQUEST] SD3 lora training support HOT 1
- [BUG] KeyError: 'chat_template' HOT 10
- stable diffusion 3 support[FEATURE REQUEST]请支持sd3 HOT 2
- Where is the fine-tuned model output? HOT 6
- [BUG]When running a seq2seq training task on the CPU, an error occurs. HOT 3
- [FEATURE REQUEST] Multi-node support
- [BUG] TypeError: can only concatenate list (not "str") to list HOT 12
- Bug or Download Manipulation of Model HOT 1
- Valid Data is set to None when not applying chat template
- RuntimeError: operator torchvision::nms does not exist HOT 10
- Override valid_data[BUG] HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autotrain-advanced.