hunk.code_window:                 ])
               trainer.fit(module)
           analysis = tune.run(train, stop={TRAINING_ITERATION: 1})
           self.assertEqual(analysis.trials[0].last_result["tune_loss"], 10 * 1.1)
       def testCheckpointCallback(self):
           tmpdir = tempfile.mkdtemp()
           self.addCleanup(lambda: shutil.rmtree(tmpdir))
  
hunk.labels: keep keep keep keep keep replace keep keep keep keep keep
hunk.after_edit:         self.assertEqual(analysis.trials[0].last_result["tune_loss"],
                            10. * 1.1)
  
hunk.file_path: python/ray/tune/tests/test_integration_pytorch_lightning.py
hunk.type: replace
file: import os
  from setuptools import setup
  from Cython.Build import cythonize
  
  import numpy
  
  pkg_dir = "cython_examples"
  modules = ["cython_simple.pyx", "masked_log.pyx"]
  install_requires = ["cython", "numpy"]
  include_dirs = [numpy.get_include()]
  
  # TODO: Need scipy to run BrainIAK example, but don't want to add additional
  # dependencies
  try:
      import scipy  # noqa
      modules.append("cython_blas.pyx")
      install_requires.append("scipy")
  except ImportError as e:  # noqa
      pass
  
  modules = [os.path.join(pkg_dir, module) for module in modules]
  
  setup(
      name=pkg_dir,
      version="0.0.1",
      description="Cython examples for Ray",
      packages=[pkg_dir],
      ext_modules=cythonize(modules),
      install_requires=install_requires,
      include_dirs=include_dirs)
  