-
Notifications
You must be signed in to change notification settings - Fork 1
This PR impements pi0.5 as a HF style wrapper #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… tokenizer - Create complete pi05 directory structure with algorithm, models, dataset, trainer, evaluator - Implement FAST tokenizer for action discretization - Add flow matching architecture with ActionFlowExpert - Implement stage-based training (pretrain and posttrain) - Add multi-modal dataset support (web_caption, qa, bounding_boxes, etc.) - Create Pi05Node for inference pipeline - Update README with Pi0.5 usage instructions - Fix import issue in pizero algorithm - Register pi05 in policy registry
cmower
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arkml/algos/vla/pi05/algorithm.py
Outdated
| weight_decay=self.weight_decay, | ||
| num_epochs=self.max_epochs, | ||
| grad_accum=1.0, # Gradient accumulation | ||
| output_dir='./output', # TODO: Get from config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please address TODO
arkml/nodes/pi05_node.py
Outdated
| from arkml.core.policy import BasePolicy | ||
|
|
||
|
|
||
| class Pi05Node(BasePolicy): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to implement publisher/subscriber/services similar to Pi0 node
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please try to make a derived class from from arkml.core.policy_node import PolicyNode
class Pi05Node(PolicyNode) ...
arkml/algos/vla/pi05/evaluator.py
Outdated
| import numpy as np | ||
|
|
||
|
|
||
| class Pi05Evaluator: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try make a sub class from arkml.core.algorithm import Evaluator
arkml/algos/vla/pi05/models.py
Outdated
| from arkml.core.app_context import ArkMLContext | ||
|
|
||
|
|
||
| def flow_matching_loss(pred, target): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same function is available in utils.py
arkml/algos/vla/pi05/models.py
Outdated
| return F.mse_loss(pred, target) | ||
|
|
||
|
|
||
| class DummyBackbone(torch.nn.Module): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still do we need DummyBackbone?
Refinath
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the PR
arkml/algos/vla/pi05/run_pi05.py
Outdated
| @@ -0,0 +1,148 @@ | |||
| """ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the use of this file ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! this was something that i used to just quickly load the model and test if it works, this was not supposed to be part of this. I pushed this along with the other files by mistake .
Apologies
…pipeline - Update Pi05Algorithm.train() signature to not accept dataset parameters - Load datasets internally using self.cfg following PiZero pattern - Make Pi05Node constructor structurally identical to PiZeroPolicyNode - Update Pi05Node to accept cfg and device parameters instead of model - Fix rollout lifecycle issues to match PiZero behavior - Add ConfigPath class to utils for YAML config loading - Update registry to properly import pi05 algorithm and models - Fix import paths in train.py, policy_service.py, and example files - Update pi05 config to match expected structure Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
…Policy entries Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This PR adds a complete, implementation of Pi0.5 for the Ark Robotics Framework. The implementation follows a HuggingFace-style wrapper pattern, integrating with the LeRobot Pi0.5 policy while maintaining compatibility with the existing ArkML architecture.
Key Features
1. Pi0.5 HuggingFace Wrapper
2. Complete Algorithm Pipeline
3. Structurally Identical Node Implementation
predict(),reset(),forward(), etc.4. Comprehensive Testing & Benchmarking
Architecture Highlights
Flow Matching Implementation
Multi-Stage Training Support
flow_alpha, integration stepsEnhanced Backbone Support
Testing Coverage
Framework Compatibility
Complete
arkml-policy algo=pi05 algo.model.model_path=...