llama-stack/llama_stack/providers/inline/post_training
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 Fix precommit check after moving to ruff (#927) 2025-02-02 06:46:45 -08:00
torchtune fix: replace eval with json decoding for format_adapter (#1328) 2025-02-28 11:25:23 -08:00
__init__.py Add init files to post training folders (#711) 2025-01-13 20:19:18 -08:00