206447f53847129741d0b1abff789b2788e89a3b,solutionbox/structured_data/datalab_structured_data/_package.py,,local_train,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,178

Before Change


  stderr = sys.stderr
  sys.stderr = sys.stdout
  print("Starting local training.")
  trainer.task.main(args)
  print("Local training done.")
  sys.stderr = stderr

def cloud_train(train_dataset,

After Change


    pids_to_kill = [p.pid]

    //script -> name = datalab_structured_data._package
    script = "import %s; %s._wait_and_kill(%s, %s)" % \
          (__name__, __name__, str(os.getpid()), str(pids_to_kill))
    monitor_process = subprocess.Popen(["python", "-c", script])

    while p.poll() is None:
      sys.stdout.write(p.stdout.readline())
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: googledatalab/pydatalab
Commit Name: 206447f53847129741d0b1abff789b2788e89a3b
Time: 2017-03-01
Author: brandondutra@google.com
File Name: solutionbox/structured_data/datalab_structured_data/_package.py
Class Name:
Method Name: local_train


Project Name: biolab/orange3
Commit Name: 1c109e38b7f036db561c808d03f4796f6f775210
Time: 2019-10-25
Author: tankovesna@hotmail.com
File Name: Orange/data/tests/test_sql_mssql.py
Class Name:
Method Name:


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: a156be457c3f7d68bc98e4505871d14cd1c45c53
Time: 2017-04-05
Author: jonwayne@google.com
File Name: vision/cloud-client/face_detection/faces_test.py
Class Name:
Method Name: test_main