Skip to content

Commit

Permalink
Merge pull request #308 from labmlai/data-store
Browse files Browse the repository at this point in the history
Data store
  • Loading branch information
lakshith-403 authored Oct 25, 2024
2 parents dfea535 + 6f76506 commit 1ebd25a
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/server/labml_app/analyses/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def defaults(cls):
errors=[],
step_range=[-1, -1],
focus_smoothed=True,
smooth_value=0.5, # 50% smooth
smooth_value=0.99,
smooth_function=SmoothFunction.LeftExponential.value,
is_base_distributed=False,
base_series_preferences=[],
Expand Down
83 changes: 83 additions & 0 deletions samples/app_api/sample.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"cells": [
{
"cell_type": "code",
"id": "59b2c982",
"metadata": {},
"source": [
"from labml.app_api import AppAPI"
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "code",
"id": "7a84769a",
"metadata": {},
"source": [
"api = AppAPI(base_url=\"http://localhost:5005/api/v1\")"
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "code",
"id": "82a4cb0484ff83de",
"metadata": {},
"source": [
"run = api.get_runs()['runs'][0]"
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "code",
"id": "4096fa58",
"metadata": {},
"source": [
"api.get_data_store(run['run_uuid'])"
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "code",
"id": "31c59f1dd8d9e401",
"metadata": {},
"source": [
"api.update_data_store(run['run_uuid'], {'foo': 'bar'})"
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "code",
"id": "7b287844",
"metadata": {},
"source": [],
"outputs": [],
"execution_count": null
}
],
"metadata": {
"kernelspec": {
"display_name": "labml",
"language": "python",
"name": "labml"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

0 comments on commit 1ebd25a

Please sign in to comment.