cbensimon HF Staff commited on
Commit
5fe6e7a
·
verified ·
1 Parent(s): 76ebf51

Update optimization.py

Browse files
Files changed (1) hide show
  1. optimization.py +0 -7
optimization.py CHANGED
@@ -47,13 +47,6 @@ def optimize_pipeline_(pipeline: Callable[P, Any], *args: P.args, **kwargs: P.kw
47
 
48
  print('compile_transformer', -(t0 - (t0 := datetime.now())))
49
 
50
- from optimization_utils import Weights, TensorProperties, ZeroGPUCompiledModel
51
-
52
- transformer: torch.nn.Module = pipeline.transformer
53
- weights = Weights({str(index): (param, TensorProperties(param)) for index, param in enumerate(transformer.parameters())})
54
-
55
- return ZeroGPUCompiledModel('', weights)
56
-
57
  with capture_component_call(pipeline, 'transformer') as call:
58
  pipeline(*args, **kwargs)
59
 
 
47
 
48
  print('compile_transformer', -(t0 - (t0 := datetime.now())))
49
 
 
 
 
 
 
 
 
50
  with capture_component_call(pipeline, 'transformer') as call:
51
  pipeline(*args, **kwargs)
52