def load_run_results(
        cls, samples, key, cache=True, load_view=True, **kwargs
    ):
        """Loads the :class:`BaseRunResults` for the given key on the
        collection.

        Args:
            samples: a :class:`fiftyone.core.collections.SampleCollection`
            key: a run key
            cache (True): whether to cache the results on the collection
            load_view (True): whether to load the run view in the results
                (True) or the full dataset (False)
            **kwargs: keyword arguments for the run's
                :meth:`BaseRunConfig.load_credentials` method

        Returns:
            a :class:`BaseRunResults`, or None if the run did not save results
        """
        dataset = samples._root_dataset

        if cache:
            results_cache = getattr(dataset, cls._results_cache_field())

            # Returned cached results if available
            if key in results_cache:
                return results_cache[key]

        run_doc = cls._get_run_doc(samples, key)

        if not run_doc.results:
            return None

        # Load run config
        run_info = cls.get_run_info(samples, key)
        config = run_info.config
        config.load_credentials(**kwargs)

        if load_view:
            run_samples = cls.load_run_view(samples, key)
        else:
            run_samples = dataset

        # Load run result from GridFS
        run_doc.results.seek(0)
        d = json_util.loads(run_doc.results.read().decode())

        try:
            run_results = BaseRunResults.from_dict(d, run_samples, config, key)
        except Exception as e:
            if run_doc.version == foc.VERSION:
                raise e

            raise ValueError(
                "Failed to load results for %s with key '%s'. The %s used "
                "fiftyone==%s but you are currently using fiftyone==%s. We "
                "recommend that you re-run the method with your current "
                "FiftyOne version"
                % (
                    cls._run_str(),
                    key,
                    cls._run_str(),
                    run_doc.version or "????",
                    foc.VERSION,
                )
            ) from e

        # Cache the results for future use in this session
        if cache:
            results_cache[key] = run_results

        return run_results
Loads the :class:`BaseRunResults` for the given key on the
        collection.

        Args:
            samples: a :class:`fiftyone.core.collections.SampleCollection`
            key: a run key
            cache (True): whether to cache the results on the collection
            load_view (True): whether to load the run view in the results
                (True) or the full dataset (False)
            **kwargs: keyword arguments for the run's
                :meth:`BaseRunConfig.load_credentials` method

        Returns:
            a :class:`BaseRunResults`, or None if the run did not save results
        
fiftyone/core/runs.py