chore(pino): add run_training entry point for Space compatibility
Browse files- scripts/sync_space.py +1 -1
- src/pino/train_hf.py +5 -0
scripts/sync_space.py
CHANGED
|
@@ -13,7 +13,7 @@ def push_training_code_to_space() -> None:
|
|
| 13 |
print("Pushing updated train_hf.py to the cloud Space...")
|
| 14 |
api.upload_file(
|
| 15 |
path_or_fileobj="src/pino/train_hf.py",
|
| 16 |
-
path_in_repo="
|
| 17 |
repo_id="mattbitzesty/pino-pimt-training",
|
| 18 |
repo_type="space",
|
| 19 |
)
|
|
|
|
| 13 |
print("Pushing updated train_hf.py to the cloud Space...")
|
| 14 |
api.upload_file(
|
| 15 |
path_or_fileobj="src/pino/train_hf.py",
|
| 16 |
+
path_in_repo="train.py",
|
| 17 |
repo_id="mattbitzesty/pino-pimt-training",
|
| 18 |
repo_type="space",
|
| 19 |
)
|
src/pino/train_hf.py
CHANGED
|
@@ -47,6 +47,11 @@ def pad_trajectory_collate(batch: list) -> dict:
|
|
| 47 |
}
|
| 48 |
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
def main() -> None:
|
| 51 |
logging.basicConfig(
|
| 52 |
level=logging.INFO,
|
|
|
|
| 47 |
}
|
| 48 |
|
| 49 |
|
| 50 |
+
def run_training() -> None:
|
| 51 |
+
"""Entry point used by the Hugging Face training Space."""
|
| 52 |
+
main()
|
| 53 |
+
|
| 54 |
+
|
| 55 |
def main() -> None:
|
| 56 |
logging.basicConfig(
|
| 57 |
level=logging.INFO,
|