original_docstring: 
              Log artifacts in hdfs.
              Missing remote sub-directories will be created if needed.
          :param local_dir: source dir path
          :param artifact_path: when specified will attempt to write under artifact_uri/artifact_path
          
docstring: Log artifacts in hdfs.
  Missing remote sub-directories will be created if needed.
docstring_tokens: Log artifacts in hdfs . Missing remote sub - directories will be created if needed .
code: def log_artifacts(self, local_dir, artifact_path=None):
          """
              Log artifacts in hdfs.
              Missing remote sub-directories will be created if needed.
          :param local_dir: source dir path
          :param artifact_path: when specified will attempt to write under artifact_uri/artifact_path
          """
          hdfs_base_path = _resolve_base_path(self.path, artifact_path)
  
          with hdfs_system(host=self.host, port=self.port) as hdfs:
  
              if not hdfs.exists(hdfs_base_path):
                  hdfs.mkdir(hdfs_base_path)
  
              for subdir_path, _, files in os.walk(local_dir):
  
                  relative_path = _relative_path(local_dir, subdir_path)
  
                  hdfs_subdir_path = self._join(hdfs_base_path, relative_path) \
                      if relative_path else hdfs_base_path
  
                  if not hdfs.exists(hdfs_subdir_path):
                      hdfs.mkdir(hdfs_subdir_path)
  
                  for each_file in files:
                      source = self._join(subdir_path, each_file)
                      destination = self._join(hdfs_subdir_path, each_file)
                      with hdfs.open(destination, 'wb') as output_stream:
                          output_stream.write(open(source, "rb").read())
code_tokens: def log_artifacts ( self , local_dir , artifact_path = None ) : hdfs_base_path = _resolve_base_path ( self . path , artifact_path ) with hdfs_system ( host = self . host , port = self . port ) as hdfs : if not hdfs . exists ( hdfs_base_path ) : hdfs . mkdir ( hdfs_base_path ) for subdir_path , _ , files in os . walk ( local_dir ) : relative_path = _relative_path ( local_dir , subdir_path ) hdfs_subdir_path = self . _join ( hdfs_base_path , relative_path ) if relative_path else hdfs_base_path if not hdfs . exists ( hdfs_subdir_path ) : hdfs . mkdir ( hdfs_subdir_path ) for each_file in files : source = self . _join ( subdir_path , each_file ) destination = self . _join ( hdfs_subdir_path , each_file ) with hdfs . open ( destination , 'wb' ) as output_stream : output_stream . write ( open ( source , "rb" ) . read ( ) )
short_docstring: Log artifacts in hdfs.
short_docstring_tokens: Log artifacts in hdfs .
comment: """
              Log artifacts in hdfs.
              Missing remote sub-directories will be created if needed.
          :param local_dir: source dir path
          :param artifact_path: when specified will attempt to write under artifact_uri/artifact_path
          """