Skip to content

Commit

Permalink
Readme tests removed.
Browse files Browse the repository at this point in the history
  • Loading branch information
norhan-synnada committed Nov 18, 2024
1 parent c71f5a5 commit 97feba1
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions tests/scripts/test_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,22 +192,6 @@ def test_composite_1_extend_from_inputs():
assert_results_equal(grads_1, grads_2)


def test_readme_model_3():
import mithril as ml

# Build a simple linear model
model = Linear(256)
# Generate a PyTorch backend with a (2,) device mesh
backend = ml.TorchBackend(device_mesh=(2, 1))
# Compile the model
pm = ml.compile(model, backend, jit=False, data_keys={"input"})
# Generate sharded data and parameters
params = {"w": backend.ones([128, 256]), "b": backend.ones([256])}
input = {"input": backend.ones(256, 128, device_mesh=(2, 1))}
# Run the compiled model
output = pm.evaluate(params, input) # noqa


def test_primitive_model_with_context():
model = Buffer()
context = TrainModel(model)
Expand Down Expand Up @@ -7175,4 +7159,4 @@ def __call__( # type: ignore[override]
trainable_keys = {"input": input}
outputs = pm.evaluate(trainable_keys)
ref_outputs = {"output": backend.ones(7) * 6}
assert_results_equal(outputs, ref_outputs)
assert_results_equal(outputs, ref_outputs)

0 comments on commit 97feba1

Please sign in to comment.