fix lib
Browse files- check_log.py +1 -1
- train_hugg.py +0 -33
check_log.py
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
# namespace = "uav-vts"
|
| 6 |
# job_id = "68c7eab1b8ca6fa7e35cf89b"
|
| 7 |
|
| 8 |
-
# print(f"
|
| 9 |
# for log in api.fetch_job_logs(namespace=namespace, job_id=job_id):
|
| 10 |
# print(log)
|
| 11 |
|
|
|
|
| 5 |
# namespace = "uav-vts"
|
| 6 |
# job_id = "68c7eab1b8ca6fa7e35cf89b"
|
| 7 |
|
| 8 |
+
# print(f"Fetching logs for job {namespace}/{job_id} ...\n")
|
| 9 |
# for log in api.fetch_job_logs(namespace=namespace, job_id=job_id):
|
| 10 |
# print(log)
|
| 11 |
|
train_hugg.py
DELETED
|
@@ -1,33 +0,0 @@
|
|
| 1 |
-
# from huggingface_hub import HfApi
|
| 2 |
-
|
| 3 |
-
# api = HfApi()
|
| 4 |
-
|
| 5 |
-
# job = api.create_job(
|
| 6 |
-
# repo_id="uav-vts/training_sem",
|
| 7 |
-
# docker_image="pytorch/pytorch:2.6.0-cuda12.4-cudnn9-devel",
|
| 8 |
-
# command="python runner/train.py",
|
| 9 |
-
# hardware="a100",
|
| 10 |
-
# # token="<TOKEN>"
|
| 11 |
-
# )
|
| 12 |
-
|
| 13 |
-
# print("Job created:", job.job_id)
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
from huggingface_hub import run_job
|
| 17 |
-
|
| 18 |
-
image = "pytorch/pytorch:2.6.0-cuda12.4-cudnn9-devel"
|
| 19 |
-
command = [
|
| 20 |
-
"python",
|
| 21 |
-
"-c",
|
| 22 |
-
"import torch; print(f'This code ran with the following GPU: {torch.cuda.get_device_name()}')"
|
| 23 |
-
]
|
| 24 |
-
|
| 25 |
-
job = run_job(
|
| 26 |
-
image=image,
|
| 27 |
-
command=command,
|
| 28 |
-
flavor="a100-large", # hoặc "a100-large" nếu cần GPU mạnh hơn
|
| 29 |
-
namespace="uav-vts", # để job thuộc account của bạn
|
| 30 |
-
)
|
| 31 |
-
|
| 32 |
-
print("Job submitted!")
|
| 33 |
-
print("Track it here:", job.url)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|