Exemple #1
0
    def define_jobs_context(self, context):
        boot_root = self.get_boot_root()
        data_central = self.get_data_central()

        GlobalConfig.global_load_dir('default')

        recipe_agentlearn_by_parallel_concurrent(context, data_central,
            Exp23.explogs_learn, n=8, only_agents=['exp23_diffeof', 'exp23_diffeo_fast'])
        
        recipe_agentlearn_by_parallel(context, data_central,
                                                Exp23.explogs_learn,
                                                only_agents=['stats2'])
        
        from diffeo2dds_learn.programs.devel.save_video import video_visualize_diffeo_stream1_robot
        
        for c, id_robot in iterate_context_names(context, Exp23.robots):
            out = os.path.join(context.get_output_dir(),
                               'videos', '%s-diffeo_stream1.mp4' % id_robot)
            c.comp_config(video_visualize_diffeo_stream1_robot,
                          id_robot=id_robot, boot_root=boot_root,
                          out=out)
        
        for id_robot in Exp23.robots:
            recipe_episodeready_by_convert2(context, boot_root, id_robot)

        jobs_publish_learning_agents_robots(context, boot_root,
                                            Exp23.agents, Exp23.robots)
Exemple #2
0
    def define_jobs_context(self, context):
        rm = context.get_report_manager()
        rm.set_html_resources_prefix('jbds-nav')

        logs = set(self.get_explogs_by_tag('navigation'))
        logs = list(logs)
        assert len(logs) >= 4

        data_central = self.get_data_central()
        recipe_episodeready_by_convert2(context, data_central.get_boot_root())
        recipe_navigation_map1(context, data_central)
        
        for c, id_explog in iterate_context_explogs(context, logs):
            explog = get_conftools_explogs().instance(id_explog)
            # Get the map that we need
            annotation_navigation = explog.get_annotations()['navigation'] 
            id_explog_map = annotation_navigation['map']
            id_robot = annotation_navigation['robot']
#             if not 'params' in annotation_navigation:
#                 self.error('incomplete %r' % id_explog)
#                 continue
            navigation_params = annotation_navigation['params']
                    
            nmap = c.get_resource(RP_NAVIGATION_MAP,
                                  id_episode=id_explog_map,
                                  id_robot=id_robot)
            
            out_base = os.path.join(c.get_output_dir(), '%s' % id_explog)
            c.comp_config(reconstruct_servo_state, id_explog, id_robot, nmap,
                          out_base=out_base,
                          navigation_params=navigation_params,
                          job_id='reconstruct')        
            
            extra_dep = [c.get_resource(RM_EPISODE_READY, id_robot=id_robot,
                                        id_episode=id_explog)]
            nmap_dist = c.comp_config(nmap_distances, data_central,
                                                id_episode=id_explog,
                                                id_robot=id_robot, nmap=nmap,
                                                extra_dep=extra_dep)
            
            report_keys = dict(id_robot=id_robot, id_episode=id_explog,
                               id_episode_map=id_explog_map)
            r = c.comp(report_nmap_distances, nmap, nmap_dist)
            c.add_report(r, 'nmap_distances', **report_keys)
            
            ep = c.get_resource(RM_EPISODE_READY,
                                id_episode=id_explog, id_robot=id_robot)
            poses = c.comp_config(poses_from_episode, data_central=data_central,
                                  id_robot=id_robot, id_episode=id_explog,
                                  extra_dep=[ep])
            
            ep0 = c.get_resource(RM_EPISODE_READY,
                                 id_episode=id_explog_map, id_robot=id_robot)
            poses0 = c.comp_config(poses_from_episode, data_central=data_central,
                                  id_robot=id_robot, id_episode=id_explog_map,
                                  extra_dep=[ep0])
             
            r = c.comp(report_trajectory, poses, poses0)
            c.add_report(r, 'trajectory', **report_keys)
Exemple #3
0
def jobs_learn_real(context, data_central, real_robots, explogs_learn):
    for id_robot in real_robots:
        recipe_agentlearn_by_parallel(context, data_central,
                                      only_robots=[id_robot],
                                      episodes=explogs_learn)
    boot_root = data_central.get_boot_root()
    
    for id_robot in real_robots:
        recipe_episodeready_by_convert2(context, boot_root, id_robot)    
Exemple #4
0
    def define_jobs_context(self, context):
        boot_config = get_boot_config()
        boot_config.agents.instance(Exp20.agents[0])
            
        boot_root = self.get_boot_root()
        data_central = self.get_data_central()

        recipe_episodeready_by_convert2(context, boot_root, id_robot=Exp20.id_robot)
        recipe_agentlearn_by_parallel(context, data_central, Exp20.explogs_learn)
        jobs_publish_learning(context, Exp20.agents, id_robot=Exp20.id_robot)
Exemple #5
0
    def define_jobs_context(self, context):
        boot_root = self.get_boot_root()
        data_central = self.get_data_central()

        recipe_agentlearn_by_parallel(context, data_central, Exp21.explogs_learn)
        
        for id_robot in Exp21.robots:
            recipe_episodeready_by_convert2(context, boot_root, id_robot)

        jobs_publish_learning_agents_robots(context, boot_root,
                                            Exp21.agents, Exp21.robots)
Exemple #6
0
    def define_jobs_context(self, context):
        boot_root = self.get_boot_root()
        data_central = self.get_data_central()

        GlobalConfig.global_load_dir('default')

        recipe_agentlearn_by_parallel_concurrent_reps(context, data_central,
            Exp32.explogs_learn, n=8, max_reps=10) 
        for id_robot in Exp32.robots:
            recipe_episodeready_by_convert2(context, boot_root, id_robot)

        jobs_publish_learning_agents_robots(context, boot_root,
                                            Exp32.agents, Exp32.robots)
Exemple #7
0
    def define_jobs_context(self, context):
        boot_root = self.get_boot_root()
        data_central = self.get_data_central()

        GlobalConfig.global_load_dir("default")

        recipe_agentlearn_by_parallel_concurrent_reps(
            context, data_central, Exp27.explogs_learn, n=8, max_reps=20, only_agents=["exp23_diffeof"]
        )

        recipe_agentlearn_by_parallel(context, data_central, Exp27.explogs_learn, only_agents=["stats2", "cmdstats"])

        for id_robot in Exp27.robots:
            recipe_episodeready_by_convert2(context, boot_root, id_robot)

        jobs_publish_learning_agents_robots(context, boot_root, Exp27.agents, Exp27.robots)
Exemple #8
0
    def define_jobs_context(self, context):
        from pkg_resources import resource_filename  # @UnresolvedImport

        config_dir = resource_filename("yc1304.uzhturtle", "config")
        GlobalConfig.global_load_dir(config_dir)
        GlobalConfig.global_load_dir("${DATASET_UZHTURTLE}")

        rm = context.get_report_manager()
        rm.set_html_resources_prefix("uzh-turtle-plots")

        data_central = self.get_data_central()

        id_robot = "uzhturtle_un1_cf1_third"
        recipe_episodeready_by_convert2(context, boot_root=self.get_boot_root())

        logs = list(self.get_explogs_by_tag("uzhturtle"))
        for c, id_explog in iterate_context_explogs(context, logs):
            jobs_turtleplot(c, data_central, id_robot, id_episode=id_explog)
Exemple #9
0
    def define_jobs_context(self, context):
        boot_root = self.get_boot_root()
        data_central = self.get_data_central()

        GlobalConfig.global_load_dir('default')
        
        recipe_agentlearn_by_parallel(context, data_central, Exp29.explogs_learn)
        
        for id_robot in Exp29.robots:
            recipe_episodeready_by_convert2(context, boot_root, id_robot)
            
        combinations = iterate_context_names_pair(context, Exp29.nmaps, Exp29.robots)
        for c, id_episode, id_robot in combinations:
            jobs_navigation_map(c,
                                outdir=context.get_output_dir(),
                                data_central=data_central,
                                id_robot=id_robot,
                                id_episode=id_episode)
Exemple #10
0
    def define_jobs_context(self, context):
        boot_root = self.get_boot_root()
        data_central = self.get_data_central()

        agents = Exp31.agents
        robots = Exp31.robots
        explogs_learn = Exp31.explogs_learn
        explogs_test = Exp31.explogs_test
        
        recipe_agentlearn_by_parallel(context, data_central, explogs_learn)

        for id_robot in robots:
            recipe_episodeready_by_convert2(context, boot_root, id_robot)
            
            jobs_servo_field_agents(context, id_robot=id_robot,
                                    agents=agents, episodes=explogs_test)
        
        jobs_publish_learning_agents_robots(context, boot_root, agents, robots)
Exemple #11
0
    def define_jobs_context(self, context):
        boot_root = self.get_boot_root()
        data_central = self.get_data_central()

        GlobalConfig.global_load_dir('default')

        recipe_agentlearn_by_parallel_concurrent(context, data_central, \
            Exp24.explogs_learn, n=8, only_agents=['exp23_diffeof', 'exp23_diffeo_fast'])
        
        recipe_agentlearn_by_parallel(context, data_central,
                                                Exp24.explogs_learn,
                                                only_agents=['stats2'])
        
        
        for id_robot in Exp24.robots:
            recipe_episodeready_by_convert2(context, boot_root, id_robot)

        jobs_publish_learning_agents_robots(context, boot_root,
                                            Exp24.agents, Exp24.robots)
Exemple #12
0
    def define_jobs_context(self, context):
        boot_root = self.get_boot_root()
        data_central = self.get_data_central()

        # for vehicles
        GlobalConfig.global_load_dir('${B11_SRC}/bvapps/bdse1')
                
        recipe_episodeready_by_convert2(context, boot_root)

        recipe_episodeready_by_simulation_tranches(context, data_central,
                                                   explorer=Exp42.explorer,
                                                   episodes=Exp42.simulated_episodes,
                                                   max_episode_len=30,
                                                   episodes_per_tranche=50)
        
        for c in Exp42.combinations:
            recipe_agentlearn_by_parallel(context, data_central, c['episodes'],
                                          only_robots=[c['id_robot']],
                                          intermediate_reports=False,
                                          episodes_per_tranche=50)

        jobs_publish_learning_agents_robots(context, boot_root,
                                            Exp42.agents, Exp42.robots)