llama-stack/llama_stack/providers/inline/post_training/torchtune
Xi Yan 15f69e75ff
fix: replace eval with json decoding for format_adapter (#1328)
# What does this PR do?
- using `eval` is a security risk

[//]: # (If resolving an issue, uncomment and update the line below)
[//]: # (Closes #[issue-number])

## Test Plan

- see https://github.com/meta-llama/llama-stack/pull/1327

cc @SLR722 we will need to update the corresponding dataset via

```python
def update_to_json_str():
        
dataset = datasets.load_dataset(...)
processed_dataset = dataset[split].map(
        lambda x: {
                "column": json.dumps(eval(x["column"]))
       }
)
processed_dataset.push_to_hub(...)
```
[//]: # (## Documentation)
2025-02-28 11:25:23 -08:00
..
common feat: [post training] support save hf safetensor format checkpoint (#845) 2025-02-25 23:29:08 -08:00
datasets fix: replace eval with json decoding for format_adapter (#1328) 2025-02-28 11:25:23 -08:00
recipes chore(lint): update Ruff ignores for project conventions and maintainability (#1184) 2025-02-28 09:36:49 -08:00
__init__.py [1/n] torchtune <> llama-stack integration skeleton (#540) 2024-12-13 11:05:35 -08:00
config.py feat: [post training] support save hf safetensor format checkpoint (#845) 2025-02-25 23:29:08 -08:00
post_training.py fix: miscellaneous job management improvements in torchtune (#1136) 2025-02-19 19:09:37 -08:00