Skip to content

Commit

Permalink
update requirements, setup, README links,
Browse files Browse the repository at this point in the history
versioning docs
  • Loading branch information
amakelov committed Jul 2, 2024
1 parent 3d152d1 commit 9101296
Show file tree
Hide file tree
Showing 19 changed files with 1,304 additions and 2,600 deletions.
22 changes: 6 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
<img src="assets/logo-no-background.png" height=128 alt="logo" align="center">
<br>
<a href="#install">Install</a> |
<a href="#quickstart">Quickstart</a> |
<a href="https://colab.research.google.com/github/amakelov/mandala/blob/master/tutorials/hello.ipynb">Quickstart (Colab)</a> |
<a href="#tutorials">Tutorials</a> |
<a href="https://amakelov.github.io/mandala/">Docs</a> |
<a href="#testimonials">Testimonials</a> |
<a href="#video-walkthroughs">Demos</a> |
<a href="#basic-usage">Usage</a> |
<a href="#other-gotchas">Gotchas</a> |
<a href="#tutorials">Tutorials</a>
</div>

# Computations that save, query and version themselves
Expand Down Expand Up @@ -38,20 +36,12 @@ two tools:
pip install git+https://github.com/amakelov/mandala
```

# Quickstart

[Run in Colab](https://colab.research.google.com/github/amakelov/mandala/blob/master/mandala/_next/tutorials/hello.ipynb)

# Documentation
TODO: link

# Tutorials
- see the ["Hello world!"
tutorial](https://github.com/amakelov/mandala/blob/master/tutorials/00_hello.ipynb)
tutorial](https://github.com/amakelov/mandala/blob/master/tutorials/hello.ipynb)
for a 2-minute introduction to the library's main features
- See [this notebook](https://github.com/amakelov/mandala/blob/master/tutorials/01_random_forest.ipynb)
for a more realistic example of a machine learning project managed by Mandala.
- TODO: dependency tracking
- see [this notebook](https://github.com/amakelov/mandala/blob/master/tutorials/ml.ipynb)
for a more realistic example of managing a machine learning project.

# FAQs

Expand Down
367 changes: 315 additions & 52 deletions docs/docs/04_versions.md

Large diffs are not rendered by default.

160 changes: 160 additions & 0 deletions docs/docs/04_versions_files/04_versions_12_0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@
--md-code-bg-color: #eee8d5;
--md-code-fg-color: #657b83;
}

a {
text-decoration: underline;
}
24 changes: 20 additions & 4 deletions mandala/deps/shallow_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,27 @@ def commit(self, content: T, is_semantic_change: Optional[bool] = None) -> str:
self.content_adapter.get_presentable_content(content),
self.get_presentable_content(commit=self.head),
)
print(
_get_colorized_diff(
current=presentable_diff[1], new=presentable_diff[0]
if Config.has_rich:
colorized_diff = _get_colorized_diff(
current=presentable_diff[1], new=presentable_diff[0],
colorize=False,
)
panel = Panel(
Syntax(
colorized_diff,
lexer="diff",
line_numbers=True,
theme="solarized-light",
),
title="Diff",
)
)
rich.print(panel)
else:
colorized_diff = _get_colorized_diff(
current=presentable_diff[1], new=presentable_diff[0],
colorize=True,
)
print(colorized_diff)
answer = ask_user(
question="Does this change require recomputation of dependent calls?\nWARNING: if the change created new dependencies and you choose 'no', you should add them by hand or risk missing changes in them.\nAnswer: [y]es/[n]o/[a]bort",
valid_options=["y", "n", "a"],
Expand Down
2 changes: 1 addition & 1 deletion mandala/deps/versioner.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def sync_codebase(self, code_state: CodeState):
)
print(f"CHANGE DETECTED in {component[1]} from module {component[0]}")
print(f"Dependent components:\n{dependent_versions_presentation}")
print(f"===DIFF===:")
# print(f"===DIFF===:")
dag.sync(content=content)
# update the DAGs if all commits succeeded
self.component_dags = dags
Expand Down
6 changes: 3 additions & 3 deletions mandala/docs/01_storage_and_ops.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 8,
"metadata": {
"execution": {
"iopub.execute_input": "2024-07-02T21:40:11.743630Z",
Expand All @@ -104,13 +104,13 @@
"name": "stdout",
"output_type": "stream",
"text": [
"AtomRef(17, hid='43b...', cid='89c...')\n"
"AtomRef(42, hid='168...', cid='d92...')\n"
]
}
],
"source": [
"with storage: # all `@op` calls inside this block use `storage`\n",
" s = sum_args(1, 2, 3, 4, c=6,)\n",
" s = sum_args(6, 7, 8, 9, c=11,)\n",
" print(s)"
]
},
Expand Down
Loading

0 comments on commit 9101296

Please sign in to comment.